RosettaCodeData/Task/List-comprehensions/CoffeeScript/list-comprehensions-2.coffee

2 lines
114 B
CoffeeScript
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
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])