A B

Works with both positive and negative integers.

say STDIN.readline.words.map{.to_i}.sum

More idiomatically:

say read(String).words»to_i()»«+»

Explicit summation:

var (a, b) = read(String).words.map{.to_i}...
say a+b

Last updated