From 2e37e4160d6193c4a5ff0982d95077f0ebda3e18 Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sun, 15 Sep 2024 16:23:57 +0100 Subject: [PATCH] Add a simple test for the map function --- test/function.vli | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/function.vli b/test/function.vli index 527cc01..dbfe738 100644 --- a/test/function.vli +++ b/test/function.vli @@ -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)))