haskell 006
parent
e87b4e4b64
commit
254727b0a8
|
@ -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…
Reference in New Issue