fix map function and benchmark tests

This commit is contained in:
ngradwohl
2019-07-29 18:00:04 +02:00
parent 7d153fb3f1
commit 706ba55928
2 changed files with 4 additions and 7 deletions

View File

@@ -36,7 +36,7 @@
(test "range with step" (range 0 4 2) (0 2 4))
(test "range with negative step" (range 0 -4 -1) (0 -1 -2 -3 -4))
(test "map" (map (1 2 3) (λ (a) (add 1 a))) (2 3 4))
(test "filter" (filter (2 3 4 5 6)) (λ (a) (eq 0 (mod a 2))) (2 4 6))
(test "filter" (filter (2 3 4 5 6) (λ (a) (eq 0 (mod a 2)))) (2 4 6))
(test "reduce" (reduce (1 2 3) (λ (acc val) (add acc val)) 4) 10)
; Scope
@@ -65,4 +65,4 @@
(echo (filepath))
(echo (dirpath))
(echo (file))
(echo (dir))
(echo (dir))