Add a simple test for the map function
This commit is contained in:
parent
049aeef62f
commit
2e37e4160d
1 changed files with 7 additions and 0 deletions
|
@ -43,3 +43,10 @@
|
|||
|
||||
(fn add-four (x) (+ x four))
|
||||
(assert (= (add-four 5) 9))
|
||||
|
||||
|
||||
;; Passing lisp functions to native functions as parameters
|
||||
;; (map is implemented in C++)
|
||||
|
||||
(assert (= (map '(1 2 3) (fn square (x) (* x x)))
|
||||
'(1 4 9)))
|
||||
|
|
Loading…
Reference in a new issue