[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Formal Comment: what is the required behavior of 'lazy'?

Formal Comment

Submitter's name: Richard Kelsey
Submitter's email: kelsey at s48.org
Relevant draft: r7rs draft 6

Type: clarification
Priority: minor
Relevant section of draft: Derived expression types

Summary: 'lazy' is underspecified

The description of (lazy <expression>) says

 The returned promise, when forced, will evaluate to whatever the
 original promise would have evaluated to if it had been forced.

This describes what

 (delay (force <expression>))

does.  On the other hand, the description of the stream-filter example
says that '(lazy <x>)' is not the same as '(delay (force <x>))'.  If
this is true, the description of 'lazy' needs to say what the
difference is.
                                  -Richard Kelsey

Scheme-reports mailing list