Browse Source

haskell 006

master
Evan Hemsley 11 months ago
parent
commit
254727b0a8
  1. 8
      haskell/euler006.hs

8
haskell/euler006.hs

@ -0,0 +1,8 @@
module Main where
sum_of_squares n = sum $ map (\m -> m * m) [1..n]
square_of_sum n = (\m -> m * m) (sum [1..n])
main = do
print $ (square_of_sum 100) - (sum_of_squares 100)
Loading…
Cancel
Save