svn: r9042
This commit is contained in:
Eli Barzilay 2008-03-21 17:51:41 +00:00
parent 40ec407042
commit c3a503a897

View File

@ -24,15 +24,15 @@ The @schememodname[mzlib/etc] library re-exports the following
@schememodname[scheme/base] and other libraries: @schememodname[scheme/base] and other libraries:
@schemeblock[ @schemeblock[
boolean=? boolean=?
true true
false false
build-list build-list
build-string build-string
build-vector build-vector
compose compose
local local
symbol=? symbol=?
] ]
@defform[(begin-lifted expr ...+)] @defform[(begin-lifted expr ...+)]
@ -170,21 +170,20 @@ corresponding expression are bound to the multiple variables.
]} ]}
@defproc[(loop-until [start any/c][done? (any/c . -> . any)] @defproc[(loop-until [start any/c] [done? (any/c . -> . any)]
[next (any/c . -> . any/c)] [next (any/c . -> . any/c)]
[f (any/c . -> . any)]) [f (any/c . -> . any)])
void?]{ void?]{
Repeatedly invokes the @scheme[f] procedure until the @scheme[done?] Repeatedly invokes the @scheme[f] procedure until the @scheme[done?]
procedure returns @scheme[#t]: procedure returns @scheme[#t]:
@schemeblock[ @schemeblock[
(define loop-until (define (loop-until start done? next f)
(lambda (start done? next f)
(let loop ([i start]) (let loop ([i start])
(unless (done? i) (unless (done? i)
(f i) (f i)
(loop (next i)))))) (loop (next i)))))
]} ]}
@ -222,9 +221,9 @@ Equivalent to @scheme[(let id bindings body ...+)].}
Equivalent, respectively, to Equivalent, respectively, to
@schemeblock[ @schemeblock[
(letrec ((id value-expr)) id) (letrec ([id value-expr]) id)
(letrec ((id (lambda (arg-id ...) value-expr))) id) (letrec ([id (lambda (arg-id ...) value-expr)]) id)
(letrec ((id (lambda (arg-id ... . rest-id) value-expr))) id) (letrec ([id (lambda (arg-id ... . rest-id) value-expr)]) id)
]} ]}