RosettaCodeData/Task/List-comprehensions/CoffeeScript/list-comprehensions-2.coffee
2023-07-01 13:44:08 -04:00

1 line
114 B
CoffeeScript

pyth = (n) -> flatten (flatten ([x, y, z] for z in [y..n] when x*x + y*y is z*z for y in [x..n]) for x in [1..n])