Created
April 15, 2015 12:41
-
-
Save shigemk2/f51c46bc45338960d4eb to your computer and use it in GitHub Desktop.
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
import Control.Monad | |
main = do | |
colors <- forM [1,2,3,4] $ \a -> do | |
putStrLn $ "Which color do you associate with the number " | |
++ show a ++ "?" | |
color <- getLine | |
return color | |
putStrLn "The colors that you associate with 1, 2, 3 and 4 are: " | |
mapM putStrLn colors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment