Created
December 29, 2022 16:10
-
-
Save MAGANER/9f1d0387576f42cf5965a7f582040ea2 to your computer and use it in GitHub Desktop.
task #6 from https://projecteuler.net
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum1::[Int] -> Int | |
sum1 seq = sum [x*x | x <- seq] | |
sum2::[Int] -> Int | |
sum2 seq = | |
let s = sum [x | x <- seq] | |
in s*s | |
main::IO() | |
main = print $ sum2 [1..100] - sum1 [1..100] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment