Talk:Sum and product puzzle: Difference between revisions

(→‎Scala: (relevance or otherwise to REXX of solutions built around higher order functions))
(→‎A question on GO: new section)
Line 19:
:: Still not explicit enough :-( Sorry Meanwhile I added 2 translations where I could understand the source (AWK and GO/ --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 18:54, 26 October 2016 (UTC)
::: Do higher order functions feature in the architecture or traditions of REXX ? If not, the patterns of functional composition used in the Haskell and Scala etc examples may be a little hard to translate all that directly. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 19:18, 3 November 2016 (UTC)
 
== A question on GO ==
 
I translated GO to Rexx and the fonal piece missing for understanding is this:
 
Why does this justify the removal of the pair p??
 
Shouldn't the pair a/b be discarded???
 
<pre>
for a := 2; a < s/2+s&1; a++ {
b := s - a
if products[a*b] == 1 {
// Excluded because P would have a unique product
continue pairs</pre>
~~----
2,289

edits