Created
March 17, 2013 22:42
-
-
Save nabe256/5183954 to your computer and use it in GitHub Desktop.
NSEG #37 Code Golf
This file contains hidden or 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
| import System.Environment | |
| import Data.Char | |
| knum = "〇一二三四五六七八九" | |
| kketa = "十百千" | |
| main = do | |
| args <- getArgs | |
| if length args == 0 | |
| then putStrLn "input: number" | |
| else translate $ args !! 0 | |
| translate = putStrLn . reverse . map (\x -> knum!!(digitToInt x)) . reverse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment