haskell: add p1, p2

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-10-26 12:49:33 +05:30
parent fcce234a10
commit 6c89f18e9d
3 changed files with 15 additions and 0 deletions

7
haskell/p2.hs Normal file
View File

@@ -0,0 +1,7 @@
import Lib (fib)
main :: IO ()
main = putStr $ show solve
solve :: Integer
solve = sum $ filter even $ takeWhile (<= 4000000) fib