Skip to content

Instantly share code, notes, and snippets.

@phg1024
Created November 2, 2015 03:03
Show Gist options
  • Save phg1024/88a22bfa02469971dfa2 to your computer and use it in GitHub Desktop.
Save phg1024/88a22bfa02469971dfa2 to your computer and use it in GitHub Desktop.
Read several numbers
main = do
n <- readLn :: IO Int
nums <- forM (take n [1..]) (\x -> do
readLn :: IO Int)
print nums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment