Created
July 20, 2014 13:05
-
-
Save 314maro/69528adb133fb462be6c to your computer and use it in GitHub Desktop.
morse
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
l=[".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."];toM=fmap unwords.mapM(`lookup`zip['A'..]l);toA=mapM(`lookup`zip l['A'..]).words | |
main=maybe(return())putStrLn$toA"... --- ..." | |
-- or | |
-- main=maybe(return())putStrLn$toM"HOGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment