mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 04:43:25 +03:00
827c51e343
Some way through the interfaces docs, but "using" for named parent interfaces is not implemented yet.
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 ]
|