delay-force -- r7rs Definition syntax;
delay-force (from vonuvoli);Syntax keywords:
expression: expression;Syntax variants:
(_ expression)scheme:lazy -- (scheme lazy);scheme -- (scheme);(delay-force <expression>)Semantics: The expression
(delay-force expression)is conceptually similar to(delay (force expression)), with the difference that forcing the result ofdelay-forcewill 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 ofdelayandforcecan be rewritten usingdelay-forceto prevent consuming unbounded space during evaluation.
The text herein was sourced and adapted as described in the "R7RS attribution of various text snippets" appendix.