Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created November 6, 2008 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benhoskings/22588 to your computer and use it in GitHub Desktop.
Save benhoskings/22588 to your computer and use it in GitHub Desktop.
rightTriangles = [ (a,b,c) | c <- [1..500], b <- [1..c], a <- [1..b], a^2 + b^2 == c^2]
main = print rightTriangles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment