RosettaCodeData/Task/A+B/ArkScript/a+b.ark

10 lines
215 B
Plaintext

(import std.String :split)
(import std.List :map :reduce)
(let in (input))
(let numbers (map (split in " ") (fun (t) (toNumber t))))
(print (reduce numbers (fun (a b)
(if (nil? b)
a
(+ a b)))))