mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Fix bug in accumulating in (chibi loop)
Accumulating has a bug that makes only lists supported, due to it ignoring the init value and always use the empty list. This fixes that.
This commit is contained in:
parent
12636f4b19
commit
c896bf90c5
1 changed files with 2 additions and 2 deletions
|
@ -368,14 +368,14 @@
|
||||||
(accumulating (kons final i) ((var cursor) x) n . rest))
|
(accumulating (kons final i) ((var cursor) x) n . rest))
|
||||||
((accumulating (kons final init) ((var cursor) (expr (if check))) n . rest)
|
((accumulating (kons final init) ((var cursor) (expr (if check))) n . rest)
|
||||||
(n ((tmp-kons kons))
|
(n ((tmp-kons kons))
|
||||||
((cursor '() (if check (tmp-kons expr cursor) cursor)))
|
((cursor init (if check (tmp-kons expr cursor) cursor)))
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
((var (final cursor)))
|
((var (final cursor)))
|
||||||
. rest))
|
. rest))
|
||||||
((accumulating (kons final init) ((var cursor) (expr)) n . rest)
|
((accumulating (kons final init) ((var cursor) (expr)) n . rest)
|
||||||
(n ((tmp-kons kons))
|
(n ((tmp-kons kons))
|
||||||
((cursor '() (tmp-kons expr cursor)))
|
((cursor init (tmp-kons expr cursor)))
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
((var (final cursor)))
|
((var (final cursor)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue