chickadee » scheme » 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.

The delay-force macro is a CHICKEN extension to R5RS, taken from R7RS.

See the description of force (under Control features, below) for a more complete description of delayed evaluation.