From 86a7e3bbc4fc8684390817182e3e114fce9d6d01 Mon Sep 17 00:00:00 2001 From: Quentin Leonetti Date: Sun, 14 Jul 2019 07:53:59 +0200 Subject: [PATCH] add test for map filter reduce --- examples/benchmark.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/benchmark.lisp b/examples/benchmark.lisp index 478e06c..2ac3622 100644 --- a/examples/benchmark.lisp +++ b/examples/benchmark.lisp @@ -37,6 +37,9 @@ (test "range simple" (range 0 4) (0 1 2 3 4)) (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 (lambda (a) (add 1 a)) (1 2 3)) (2 3 4)) + (test "filter" (filter (lambda (a) (eq 0 (mod a 2))) (2 3 4 5 6)) (2 4 6)) + (test "reduce" (reduce (lambda (acc val) (add acc val)) (1 2 3) 4) 10) ; Scope