Talk:Sum and product puzzle: Difference between revisions
Content added Content deleted
(→Scala) |
Walterpachl (talk | contribs) (→Scala: more Explanation needed) |
||
Line 17: | Line 17: | ||
: step3 filters the set defined by step2 for pairs where "The number X*Y has only one product decomposition for which fact 1 is true" |
: step3 filters the set defined by step2 for pairs where "The number X*Y has only one product decomposition for which fact 1 is true" |
||
: Perhaps the Haskell or JavaScript versions might seem more legible ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:35, 21 October 2016 (UTC) |
: Perhaps the Haskell or JavaScript versions might seem more legible ? [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:35, 21 October 2016 (UTC) |
||
:: 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) |
Revision as of 18:54, 26 October 2016
Remove draft status?
Now that I improved the task description, is this task ready for prime time? --Smls (talk) 14:47, 5 August 2016 (UTC)
Scala
Could someone in the know please explain these two lines in plain English?
val step2 = step0 filter { sumEq(_) forall { prodEq(_).size != 1 }}
step2 contains the pairs whose product is unique and ??
val step3 = step2 filter { prodEq(_).intersect(step2).size == 1 }
- step2 filters the step0 integer pairs for pairs where "For every possible sum decomposition of the number X+Y, the product has in turn more than one product decomposition"
- step3 filters the set defined by step2 for pairs where "The number X*Y has only one product decomposition for which fact 1 is true"
- Perhaps the Haskell or JavaScript versions might seem more legible ? Hout (talk) 17:35, 21 October 2016 (UTC)
- Still not explicit enough :-( Sorry Meanwhile I added 2 translations where I could understand the source (AWK and GO/ --Walterpachl (talk) 18:54, 26 October 2016 (UTC)