chickadee » chicken » base » delay-force

(delay-force <expression>)syntax

The expression (delay-force expression) is conceptually similar to (delay (force expression)), with the difference that forcing the result of delay-force will in effect result in a tail call to (force expression), while forcing the result of (delay (force expression)) might not.

Thus iterative lazy algorithms that might result in a long series of chains of delay and force can be rewritten using delay-force to prevent consuming unbounded space during evaluation.

This special form is compatible with the definition from the R7RS (scheme lazy) library.

See the description of force under Control features in the "scheme" module documentation for a more complete description of delayed evaluation.

For more information regarding the unbounded build-up of space, see the SRFI-45 rationale.