mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Adding map for HOF
This commit is contained in:
5
tests/map.mal
Normal file
5
tests/map.mal
Normal file
@ -0,0 +1,5 @@
|
||||
; 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)))
|
||||
Reference in New Issue
Block a user