9 lines
215 B
Text
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)))))
|