Big change: lexical scoping
This introduces lexical scoping of for clauses. See README.md
This commit is contained in:
parent
769553832b
commit
2c323be362
5 changed files with 132 additions and 63 deletions
|
@ -508,6 +508,21 @@
|
|||
((var var))
|
||||
. rest))))
|
||||
|
||||
|
||||
;; this is an internal "accumulator". It is used for final tests
|
||||
;; :final in goof differs from in racket. It is lexical, meaning it
|
||||
;; is tested where it is placed in the clauses, and any subloop is
|
||||
;; executed completely.
|
||||
(define-syntax final
|
||||
(syntax-rules (:acc)
|
||||
((_ :acc ((var) (test)) n . rest)
|
||||
(n ()
|
||||
((final #f test))
|
||||
(final)
|
||||
()
|
||||
()
|
||||
. rest))))
|
||||
|
||||
;;; Here starts generator clauses.
|
||||
|
||||
(define (generator->list gen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue