mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
5 lines
159 B
Plaintext
5 lines
159 B
Plaintext
(defn main []
|
|
(let-do [xs $[1 2 3 4 5]]
|
|
(StaticArray.map! xs &(fn [x] (* @x 2)))
|
|
(println* (StaticArray.reduce &(fn [total x] (+ total @x)) 0 xs))))
|