aboutsummaryrefslogtreecommitdiff
path: root/tests/list.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/list.lisp')
-rw-r--r--tests/list.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/list.lisp b/tests/list.lisp
index 168ccf2..e154458 100644
--- a/tests/list.lisp
+++ b/tests/list.lisp
@@ -15,9 +15,13 @@
(assert-error (set-cdr (list 1) (list 2) (list 3)))
(assert-error (set-cdr ""))
+
(assert (= 3 (length (list 1 2 3))))
(assert (= 0 (length nil)))
(assert (= 3 (nth 2 (list 1 2 3))))
(assert (equal? nil (nthcdr 2 (list 1 2 3))))
(assert (equal? (list 3) (nthcdr 1 (list 1 2 3))))
+
+(assert (equal? (list 1 2 3 4)
+ (map (lambda (x) (+ 1 x)) (list 0 1 2 3))))