revised docs for 'delay', which now accepts a body sequence instead of a single expression

svn: r16783
This commit is contained in:
Matthew Flatt 2009-11-15 14:25:49 +00:00
parent 92aa2fc780
commit c34d5f3776

View File

@ -17,20 +17,20 @@ Returns @scheme[#t] if @scheme[v] is a promise, @scheme[#f]
otherwise.} otherwise.}
@defform[(delay expr)]{ @defform[(delay body ...+)]{
Creates a promise that, when @scheme[force]d, evaluates @scheme[expr] Creates a promise that, when @scheme[force]d, evaluates the
to produce its value.} @scheme[body]s to produce its value.}
@defform[(lazy expr)]{ @defform[(lazy body ...+)]{
Like @scheme[delay], except that if @scheme[expr] produces a promise, Like @scheme[delay], except that if the last @scheme[body] produces a
then this promise is @scheme[force]d to obtain a value. In other promise, then this promise is @scheme[force]d to obtain a value. In
words, this form creates a kind of a composable promise, which is other words, this form creates a kind of a composable promise, which
mostly useful for implementing lazy libraries and languages. Also is mostly useful for implementing lazy libraries and languages. Also
note that the @scheme[expr] in this case is restricted to one that note that the last @scheme[body] in this case is restricted to one
produces a single value.} that produces a single value.}
@defproc[(force [v any/c]) any]{ @defproc[(force [v any/c]) any]{