26 lines
623 B
Scheme
26 lines
623 B
Scheme
![]() |
;; This is just a file with things that should be written as a test. Dump file.
|
||
|
|
||
|
(loop ((:for a (in-list '(((1) (2)) ((3) (4)) ((5) (6 7)))))
|
||
|
(:when #t)
|
||
|
(:for b (in-list a))
|
||
|
(:when #t)
|
||
|
(:for c (in-list b))
|
||
|
(:for acc (listing c)))
|
||
|
=> acc)
|
||
|
|
||
|
|
||
|
(loop ((:for a (in-list '((1 2) (3 4) (5 6))))
|
||
|
(:when #t)
|
||
|
(:for b (in-list a))
|
||
|
(:for acc (listing b)))
|
||
|
=> acc)
|
||
|
|
||
|
(loop ((:for a (in-list '(1 2 3)))
|
||
|
(:acc oa (summing a))
|
||
|
:subloop
|
||
|
(:for b (up-from a (to (+ a 2))))
|
||
|
(:acc ob (listing b)))
|
||
|
=> (values oa ob))
|
||
|
;; Should return 6 and (1 2 2 3 3 4
|
||
|
|