pythagorean-triples.hs 190 B

123456
  1. triples :: [(Integer, Integer, Integer)]
  2. triples = [(x,y,z) | z <-[1..],
  3. x <- [1..z],
  4. y <- [1..z],
  5. z^2 == x^2 + y^2
  6. ]