capital S like in rest of docs
svn: r8925
This commit is contained in:
parent
77e7725571
commit
08953a7baf
|
@ -844,7 +844,7 @@ below, but it is the right choice for new contract
|
||||||
constructors or first-time contract builders.
|
constructors or first-time contract builders.
|
||||||
|
|
||||||
The first argument is the name of the contract. It can be an
|
The first argument is the name of the contract. It can be an
|
||||||
arbitrary s-expression. The second is a projection (see
|
arbitrary S-expression. The second is a projection (see
|
||||||
above).
|
above).
|
||||||
|
|
||||||
The final argument is a predicate that is a
|
The final argument is a predicate that is a
|
||||||
|
@ -861,7 +861,7 @@ functions, but reject all other values.}
|
||||||
|
|
||||||
@defproc[(build-compound-type-name [c/s any/c] ...) any]{
|
@defproc[(build-compound-type-name [c/s any/c] ...) any]{
|
||||||
|
|
||||||
Produces an s-expression to be used as a name
|
Produces an S-expression to be used as a name
|
||||||
for a contract. The arguments should be either contracts or
|
for a contract. The arguments should be either contracts or
|
||||||
symbols. It wraps parenthesis around its arguments and
|
symbols. It wraps parenthesis around its arguments and
|
||||||
extracts the names from any contracts it is supplied with.}
|
extracts the names from any contracts it is supplied with.}
|
||||||
|
|
|
@ -269,6 +269,19 @@ Like @scheme[foldl], but the lists are traversed from right to left.
|
||||||
(foldr (lambda (v l) (cons (add1 v) l)) '() '(1 2 3 4))
|
(foldr (lambda (v l) (cons (add1 v) l)) '() '(1 2 3 4))
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@defproc[(flatten [x any/c])
|
||||||
|
list?]{
|
||||||
|
|
||||||
|
Like @scheme[foldl], but the lists are traversed from right to left.
|
||||||
|
Unlike @scheme[foldl], @scheme[foldr] processes the @scheme[lst]s in
|
||||||
|
space proportional to the length of @scheme[lst]s (plus the space for
|
||||||
|
each call to @scheme[proc]).
|
||||||
|
|
||||||
|
@examples[
|
||||||
|
(foldr cons '() '(1 2 3 4))
|
||||||
|
(foldr (lambda (v l) (cons (add1 v) l)) '() '(1 2 3 4))
|
||||||
|
]}
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
@section{List Filtering}
|
@section{List Filtering}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user