diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 19:07:17 -0700 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-07-24 19:07:17 -0700 |
| commit | 192ab9c4e21bab8c08a640b349fa9630a9a672df (patch) | |
| tree | 41c63d2576ab52ce2a7688804753a4f1a39c2cb0 /csc/loop-test.csc | |
| parent | Export some common comparers from hash-map. (diff) | |
| download | chromatopelma-192ab9c4e21bab8c08a640b349fa9630a9a672df.tar.zst | |
Fix a bug in loop with nested collect statements.
Diffstat (limited to 'csc/loop-test.csc')
| -rw-r--r-- | csc/loop-test.csc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/csc/loop-test.csc b/csc/loop-test.csc index e7341c6..9a74ad4 100644 --- a/csc/loop-test.csc +++ b/csc/loop-test.csc @@ -274,6 +274,15 @@ if (>= x 5) return x end))) +(test loop-if-collect-and + (assert-equal + '(1 2 3 4 5 6 7 8 9 10) + (loop for i from 1 to 10 + if (odd? i) + collect i + and collect (+ 1 i)))) + + (test loop-collect-advanced (assert-equal '(fred bob ken sue alice joe kris sunshine june) |
