2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 14:28:05 +02:00
LaTeX-examples/documents/Programmierparadigmen/scripts/haskell/pythagorean-triples.hs

6 lines
No EOL
190 B
Haskell

triples :: [(Integer, Integer, Integer)]
triples = [(x,y,z) | z <-[1..],
x <- [1..z],
y <- [1..z],
z^2 == x^2 + y^2
]