RosettaCodeData/Task/A+B/ArkScript/a+b.ark
2025-08-11 18:05:26 -07:00

9 lines
215 B
Text

(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)))))