Commit Graph

29 Commits

Author SHA1 Message Date
Matthew Flatt
fc52248446 add #:break' and #:final' to `for' forms
Support for break clauses complicates expansion to `for/fold/derived';
a new `syntax/for-body' library provides a helper for macros that need
to split a `for'-style body into a prefix part and wrappable part.
2012-09-14 14:57:35 -06:00
Eli Barzilay
a7064d5f6a A bunch of typo fixes from Richard Cleis. 2012-06-14 17:20:05 -04:00
Eli Barzilay
d61eb53686 Lots of documentation formatting.
Started as fixing misindented definitions, then more indentations, then
a bunch of similar things (square brackets, huge spaces at end-of-lines,
etc).
2011-08-15 07:50:04 -04:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Ryan Culpepper
042402b023 fix guide typos
closes PR 10580
2011-06-10 12:55:57 -06:00
Matthew Flatt
460504c852 add #:unless' to for' 2011-06-10 06:21:35 -07:00
Matthew Flatt
e0d26d88b6 support exact nonnegative integers as sequences 2011-04-18 14:55:02 -06:00
Sam Tobin-Hochstadt
dca895c129 Minor edits to `for/vector' docs. 2010-09-09 17:08:09 -04:00
Will M. Farr
81b1ed6e8b New updates to for/vector, for*/vector, for/flvector and for*/flvector.
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.
2010-09-09 16:23:04 -04:00
Will M. Farr
3d016150a3 Updates to for/vector, for/flvector forms and documentation.
- 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.
2010-09-09 16:22:53 -04:00
Will M. Farr
82096abb1b Added interation forms for/vector, for*/vector, for/flvector, and for*/flvector and for-clause in-flvector. 2010-08-19 18:45:13 -04:00
Matthew Flatt
162058036e fully rackety guide 2010-04-30 08:02:57 -06:00
Eli Barzilay
4288c6c2c7 The Scribble reader was improved to make it pull out the syntax
punctuations outside of the form, as it does with quote punctuations.
So things like this

  #, @foo{...}

that required the space to make the @foo read as a scribble form are
now better written as

  @#,foo{...}

This changes all such occurrences.  (In case you see this change in
your files and are worried that there might be changes: I mechanically
verified that the result of `read'ing the modified files is identical
to the previous version.)

svn: r15111
2009-06-07 10:12:32 +00:00
Matthew Flatt
7a55275a26 unit bug fixes related to new scoping of signature elements; change scribble/manual to compute ids typeset as variables at compile time, in preparation for moving from a parameter to syntax bindings; fix docs typos; extend decompiler's support for unmarshaling syntax objects
svn: r12046
2008-10-15 22:23:56 +00:00
Matthew Flatt
8140b3644e add 'bitwise-bit-set?' and 'in-value' (v4.0.2.6)
svn: r10971
2008-07-29 19:27:33 +00:00
Eli Barzilay
264af9a6d0 improved scribble syntax use
svn: r8720
2008-02-19 12:22:45 +00:00
Matthew Flatt
39cedb62ed v3.99.0.2
svn: r7706
2007-11-13 12:40:00 +00:00
Matthew Flatt
e4cbc4e6a9 371.2
svn: r7263
2007-09-02 17:39:32 +00:00
Eli Barzilay
2974f38f31 removed spaces at eolns to make new-reader-diffs easier to follow
svn: r6763
2007-06-29 05:58:56 +00:00
Matthew Flatt
7de23b6373 change scribble to use new-lambda and new-struct, and correlate definitions and uses via lexical binding
svn: r6714
2007-06-22 05:59:42 +00:00
Matthew Flatt
2e536dc70e doc work, and also generalize normalize-definition to work with opts and kws
svn: r6665
2007-06-15 01:59:06 +00:00
Matthew Flatt
ab492c3f7c some doc edits related to sequences and for
svn: r6582
2007-06-12 03:04:16 +00:00
Matthew Flatt
39a98d4266 refine and document new scheme grammar forms
svn: r6551
2007-06-09 01:39:47 +00:00
Matthew Flatt
7d7cae8bf2 get rid of for-values, change document format for mini-grammars
svn: r6549
2007-06-09 01:13:52 +00:00
Matthew Flatt
a2e6a837ae guide edits, including demotion of for/list
svn: r6499
2007-06-06 07:05:07 +00:00
Matthew Flatt
8d61bb4c70 reference-manual work
svn: r6495
2007-06-06 01:13:51 +00:00
Matthew Flatt
eeaa856ff1 reference-manual work
svn: r6480
2007-06-05 06:44:39 +00:00
Matthew Flatt
4736768878 doc and scribble work
svn: r6431
2007-06-01 06:28:46 +00:00
Matthew Flatt
c59c7ebab7 revised 'for' and docs
svn: r6400
2007-05-30 03:10:57 +00:00