There was an error while loading. Please reload this page.
1 parent 5c2b068 commit e60f958Copy full SHA for e60f958
chapter05-List-comprehensions/5.hs
@@ -0,0 +1,2 @@
1
+pyths :: Int -> [(Int, Int, Int)]
2
+pyths n = [(x, y, z) | x <- [1..n], y <- [1..n], z <- [y..n], x^2 + y^2 == z^2]
0 commit comments