Skip to content

Instantly share code, notes, and snippets.

@softa
Created September 25, 2010 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save softa/597185 to your computer and use it in GitHub Desktop.
Save softa/597185 to your computer and use it in GitHub Desktop.
numerology in haskell
import Char
r = flip mod
b [l] = l
b l = b $ map (\x -> read [x]) $ show $ sum l
s = b . map ((+1) . r 9 . r 97 . ord . toLower) . filter isAlpha
main = do
x <- getLine
putStr $ show $ s x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment