Created
March 23, 2019 22:10
-
-
Save lalaithion/e01b2744d742e2d90de8aa53ee4f5ca2 to your computer and use it in GitHub Desktop.
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
f :: Int -> Bool | |
f i = 23 == foldr ((+) . abs) i [-5..5] | |
main = do | |
putStrLn "Can you beat my Haskell puzzle?" | |
x <- getLine | |
if f (read x) then putStrLn "You beat my Haskell puzzle!" else putStrLn "Boom" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment