Created
January 17, 2016 17:24
-
-
Save anonymous/f56d0bf71d37c606afdb 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
module Main where | |
import System.Environment | |
main :: IO () | |
main = do | |
args <- getArgs | |
let num1 = read $ args !! 0 | |
let num2 = read $ args !! 1 | |
res <- num1 + num2 | |
print res | |
main = do | |
args <- getArgs | |
print $ sum $ map read args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment