diff --git a/collects/scribble/scheme.ss b/collects/scribble/scheme.ss index 7b2789545a..b3555c3aed 100644 --- a/collects/scribble/scheme.ss +++ b/collects/scribble/scheme.ss @@ -29,7 +29,9 @@ (define opt-color "schemeopt") (define current-keyword-list + ;; This is temporary, until the MzScheme manual is filled in... (make-parameter '(define require provide + define-values begin0 when unless new send if cond begin else and or define-syntax syntax-rules define-struct quote quasiquote unquote unquote-splicing diff --git a/collects/scribblings/guide/define.scrbl b/collects/scribblings/guide/define.scrbl index 0c6b4d3a72..131da60c5a 100644 --- a/collects/scribblings/guide/define.scrbl +++ b/collects/scribblings/guide/define.scrbl @@ -3,7 +3,7 @@ @require[(lib "eval.ss" "scribble")] @require["guide-utils.ss"] -@title{Definitions} +@title{Definitions: @scheme[define] and @scheme[define-values]} A definition can have the form diff --git a/collects/scribblings/guide/for.scrbl b/collects/scribblings/guide/for.scrbl index c0f2f83ccc..2f1efd963c 100644 --- a/collects/scribblings/guide/for.scrbl +++ b/collects/scribblings/guide/for.scrbl @@ -291,7 +291,7 @@ the same facility with nested iterations: (list book chapter)) ] -@section{@scheme[for/fold] and @scheme[for*/fold]} +@section[#:tag "guide:for/fold"]{@scheme[for/fold] and @scheme[for*/fold]} The @scheme[for/fold] form generalizes the way to combine iteration results. Its syntax is slightly different than the syntax of diff --git a/collects/scribblings/guide/forms.scrbl b/collects/scribblings/guide/forms.scrbl index 4f21868793..0464b8f8e9 100644 --- a/collects/scribblings/guide/forms.scrbl +++ b/collects/scribblings/guide/forms.scrbl @@ -16,5 +16,14 @@ complete coverage of the basic Scheme syntactic forms. @include-section["apply.scrbl"] @include-section["lambda.scrbl"] @include-section["define.scrbl"] -@include-section["for.scrbl"] +@include-section["let.scrbl"] +@include-section["named-let.scrbl"] + +@section{Conditionals: @scheme[if], @scheme[cond], @scheme[and], and @scheme[or]} + +@section{Sequencing: @scheme[begin], @scheme[begin0], @scheme[when], and @scheme[unless]} + +@section{Assignment: @scheme[set!]} + +@section{Quoted Data: @scheme[quote] and @scheme[quasiquote]} diff --git a/collects/scribblings/guide/guide.scrbl b/collects/scribblings/guide/guide.scrbl index be486e1b99..78ef77e18e 100644 --- a/collects/scribblings/guide/guide.scrbl +++ b/collects/scribblings/guide/guide.scrbl @@ -37,6 +37,10 @@ In the reference manual, the documentation for each procedure describes the acceptable arguments and the result of the procedure using @idefterm{contracts}. +@; ---------------------------------------------------------------------- +@include-section["for.scrbl"] + + @; ---------------------------------------------------------------------- @section[#:tag "classes"]{Classes and Objects} diff --git a/collects/scribblings/guide/lambda.scrbl b/collects/scribblings/guide/lambda.scrbl index 052846ba24..28c6924dcb 100644 --- a/collects/scribblings/guide/lambda.scrbl +++ b/collects/scribblings/guide/lambda.scrbl @@ -3,7 +3,7 @@ @require[(lib "eval.ss" "scribble")] @require["guide-utils.ss"] -@title[#:tag "guide:lambda"]{Procedures} +@title[#:tag "guide:lambda"]{Procedures: @scheme[lambda] and @scheme[case-lambda]} A @scheme[lambda] expression creates a procedure. In the simplest case, a @scheme[lambda] expression has the form diff --git a/collects/scribblings/guide/let.scrbl b/collects/scribblings/guide/let.scrbl new file mode 100644 index 0000000000..3d5f15350e --- /dev/null +++ b/collects/scribblings/guide/let.scrbl @@ -0,0 +1,7 @@ +#reader(lib "docreader.ss" "scribble") +@require[(lib "manual.ss" "scribble")] +@require[(lib "eval.ss" "scribble")] +@require["guide-utils.ss"] + +@title{Local Binding: @scheme[let], @scheme[let*], and @scheme[letrec]} + diff --git a/collects/scribblings/guide/lists.scrbl b/collects/scribblings/guide/lists.scrbl index 1271e85e3b..4447f01f5f 100644 --- a/collects/scribblings/guide/lists.scrbl +++ b/collects/scribblings/guide/lists.scrbl @@ -107,95 +107,16 @@ procedures. One reason is that @scheme[map], @scheme[ormap], @scheme[andmap], and @scheme[filter] cover the most common kinds of list loops. -@;------------------------------------------------------------------------ -@section{Iterative Folds and Comprehensions: @scheme[for/fold] and @scheme[for/list]} - -Besides iteration procedures like @scheme[foldl], Scheme provides a -syntactic form for iteration that more closely resembles the syntax of -other languages. The @scheme[foldl] example above can be written with -the @scheme[for/fold] syntax as follows: - -@interaction[ -(for/fold ([sum 0]) - ([elem (list 1 2 3)]) - (+ sum (* elem elem))) -] - -Compare to analogous Java code, where @scheme[(list 1 2 3)] is -replaced by a collection @scheme[lst]: - -@verbatim[ -#<