From 192ab9c4e21bab8c08a640b349fa9630a9a672df Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sun, 24 Jul 2022 19:07:17 -0700 Subject: Fix a bug in loop with nested collect statements. --- csc/loop-test.csc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'csc/loop-test.csc') 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) -- cgit v1.3.1