Skip to content

Instantly share code, notes, and snippets.

@shokos
Created September 9, 2012 08:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shokos/3683328 to your computer and use it in GitHub Desktop.
第4回 スタートHaskell2 exercise8 エコー
echo = do
str <- getLine
if str == "quit"
then do
putStrLn "Do you really want to quit? (yes/no)"
ans <- getLine
if ans == "yes"
then return ()
else echo
else do
putStrLn str
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment