Skip to content

Commit e60f958

Browse files
committed
[exercise] 5.5
1 parent 5c2b068 commit e60f958

File tree

1 file changed

+2
-0
lines changed
  • chapter05-List-comprehensions

1 file changed

+2
-0
lines changed

chapter05-List-comprehensions/5.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)