mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
4f10bfcfd2
This is referred to in the documentation, so should be there
4 lines
145 B
Idris
4 lines
145 B
Idris
pythag : Int -> List (Int, Int, Int)
|
|
pythag n = [ (x, y, z) | z <- [1..n], y <- [1..z], x <- [1..y],
|
|
x*x + y*y == z*z ]
|