Skip to content

Instantly share code, notes, and snippets.

@igaiga
Last active January 27, 2016 13:49
Show Gist options
  • Save igaiga/8907566e1d9adda966d5 to your computer and use it in GitHub Desktop.
Save igaiga/8907566e1d9adda966d5 to your computer and use it in GitHub Desktop.
rightTriangles =[(a,b,c)|c<-[1..10],a<-[1..c],b<-[1..a]
, a^2+b^2==c^2, a+b+c==24]
--- Prelude> rightTriangles #=> [(8,6,10)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment