RosettaCodeData/Task/List-comprehensions/E/list-comprehensions.e
2023-07-01 13:44:08 -04: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]) } } } }