haskell 006

master
Evan Hemsley 2020-10-28 01:23:29 -07:00
parent e87b4e4b64
commit 254727b0a8
1 changed files with 8 additions and 0 deletions

8
haskell/euler006.hs Normal file
View File

@ -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)