RosettaCodeData/Task/List-comprehensions/E/list-comprehensions.e
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

3 lines
165 B
Text

pragma.enable("accumulator") # considered experimental
accum [] for x in 1..n { for y in x..n { for z in y..n { if (x**2 + y**2 <=> z**2) { _.with([x,y,z]) } } } }