Skip to content

Instantly share code, notes, and snippets.

@karszawa
Last active December 11, 2015 22:49
Show Gist options
  • Save karszawa/4672680 to your computer and use it in GitHub Desktop.
Save karszawa/4672680 to your computer and use it in GitHub Desktop.
import Data.Char
fact :: Integer -> Integer
fact 0 = 1
fact n = n * fact (n - 1)
main = putStrLn $ show $ sum $ map digitToInt $ show $ fact 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment