- when optional arguments didn't also have rest args,
it generated the wrong wrapper function
- the object-contract interaction was broken;
it was not adding the this argument in
Also removed the hack added earlier this eve.
closes PR 11180
Now use for/fold to thread the index through the iteration form, so
that all variants can take advantage of the optional #:length
argument. Previously, only the for/vector and for/flvector used the
The behavior when #:length does not match the number of iterations has
changed: iteration stops when either the vector is full, or the
requested number of iterations has been achieved, whichever comes
first. If #:length is larger than the number of iterations performed,
then the remaining slots in the vector are filled with the default
argument of (make-vector ...), which is currently 0.
- Now the faster forms take a #:length keyword to designate the length
of the vector to pre-allocate.
- The for/[fl]vector forms take multiple body expressions and set the
vector component to the value of the last one.
- When given a #:length argument, the for/vector and for/flvector
forms check that the iteration is not exceeding the given length,
raising exn:fail if it does.
- Test cases for the multiple body expressions and the exception for
excessive iterations have been added.
- Doc modifications to bring the docs in line with the new forms.
- Doc modifications to note that the #:length versions of the form
*may* all the computation to be performed more efficiently, and
stating that it "is an error" if the given length-expr does not
produce a valid length for a vector that matches the number of
iterations for the loop.
- Note that no test is made for a number of loop iterations that is
smaller than the given vector length. Also, the for*/[fl]vector
forms do not optimize when given a #:length argument. These are
areas for future improvement.
Fix a reference to meta/web to be symbolic -- otherwise things can get
confused when symlinks are used, ending up with two instances of a
single modeule (once for the symbolic reference and one for a relative
one). It's still best to avoid symlinks, though.
Simplify version specs in the techreports code, re-enable continue
reference, some reformatting.