diff options
Diffstat (limited to '')
-rw-r--r-- | tests/test/util.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test/util.scm b/tests/test/util.scm index c91017fc..2a171d12 100644 --- a/tests/test/util.scm +++ b/tests/test/util.scm @@ -49,6 +49,16 @@ (for (x c) in (zip (iota 12) (string->list "Hello, World")) x)) +(test-equal "for with improper list elements" + `(3 7) + (for (a . b) in '((1 . 2) (3 . 4)) + (+ a b))) + +(test-equal "for with longer improper list elements" + '(1 2 4) + (for (a b . c) in '((1 -1 . 1) (2 -2 . 2) (4 -4 . 4)) + (* c (+ 1 a b)))) + (test-equal "procedure label" 120 ((label factorial (lambda (n) |