Files
rust-mal/tests/map.mal
2024-06-17 02:16:51 +09:00

6 lines
129 B
Plaintext

; builtin map
(assert-eq '((1) (2) (3)) (map list '(1 2 3)))
; lambda map
(assert-eq '(2 3 4) (map (fn* [x] (+ x 1)) '(1 2 3)))