Skip to content

Instantly share code, notes, and snippets.

@achempion achempion/sample.hs
Last active Aug 29, 2015

What would you like to do?
main :: IO ()
main = do
str <- getLine
let [a,b] = words str
return ((read a :: Int) + (read b :: Int))

This comment has been minimized.

Copy link

vlm commented Sep 19, 2014

main = do
  str <- getLine
  print $ sum $ map read $ words str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.