Created
September 1, 2017 01:32
-
-
Save izanbf1803/82ef9008a8d526bf0a6d077724addf10 to your computer and use it in GitHub Desktop.
Haskell comprehension list implementing Pythagorean triples calculation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pyTriples :: Integer -> [(Integer, Integer, Integer)] | |
pyTriples n = [(a, b, c) | a <- [1..n], b <- [1..n], c <- [1..n], a^2 + b^2 == c^2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment