[Haskell-cafe] Statements spanning multiple lines?

Greg Buchholz haskell at sleepingsquirrel.org
Thu Dec 22 12:15:08 EST 2005


    You might also like to try the slightly more efficient...

pyth n = [(a,b,c) | a <- [1..n],      
                    b <- [a..n],       
                    c <- [a+1..n],     
                    a*a + b*b == c*c ]


Greg Buchholz



More information about the Haskell-Cafe mailing list