A B
say STDIN.readline.words.map{.to_i}.sumsay read(String).words»to_i()»«+»var (a, b) = read(String).words.map{.to_i}...
say a+bLast updated
Works with both positive and negative integers.
say STDIN.readline.words.map{.to_i}.sumMore idiomatically:
say read(String).words»to_i()»«+»Explicit summation:
var (a, b) = read(String).words.map{.to_i}...
say a+bLast updated