mirror of
https://github.com/carp-lang/Carp.git
synced 2024-11-05 04:44:12 +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))))
|