diff options
| author | Mistivia <i@mistivia.com> | 2025-06-24 19:50:12 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-24 19:50:12 +0800 |
| commit | a19d0c8bc99948af39b43cc8291abfa89e5a57f8 (patch) | |
| tree | 3c29d474b6e93c85190c5758af88b470eca5e9af /tests/list.lisp | |
| parent | ec5910bea4db98b40db374a2484380fe1892c563 (diff) | |
add list funcs
Diffstat (limited to 'tests/list.lisp')
| -rw-r--r-- | tests/list.lisp | 4 |
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)))) |
