tripy.hs 188 B

12345
  1. -- Slide 31
  2. square n = [(x, x * x) | x <- [1..n], x * x > 10]
  3. tripy n = [(a, b, c) | a <- [0..(div n 3)], b <- [(a + 1)..(div n 2)], c <- [(b + 1)..n], a^2 + b^2 == c^2, a + b + c == n]