Changed accumulator test/bind order to bind/test
This means vectoring exits directly when the index loop variable = :length. It also means :final has to change.
This commit is contained in:
parent
aa77fef2ad
commit
7a1137e579
3 changed files with 71 additions and 66 deletions
|
@ -512,13 +512,13 @@
|
|||
;; 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.
|
||||
;; executed until exhaustion.
|
||||
(define-syntax final
|
||||
(syntax-rules (:acc)
|
||||
((_ :acc ((var) (test)) n . rest)
|
||||
(n ()
|
||||
((final #f test))
|
||||
(final)
|
||||
((var #f test))
|
||||
()
|
||||
()
|
||||
()
|
||||
. rest))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue