Permalink
Browse files

change order of predicates to make it twice as fast

  • Loading branch information...
1 parent a242578 commit 2e88db00c396e034d9b6e1d19dcb899c18d69e99 @reiddraper committed Aug 17, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 problems/009/haskell/euler.hs
@@ -5,8 +5,8 @@ problem9 = product $ head [[a, b, c] |
c <- [1..997],
b <- [1..c],
a <- [1..b],
- isPythagoreanTriplet a b c,
- a + b + c == 1000]
+ a + b + c == 1000,
+ isPythagoreanTriplet a b c]
main :: IO ()
main = do

0 comments on commit 2e88db0

Please sign in to comment.