This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 234: Add EAGER from SRFI 45

2012-10-05 12:16:26
WG1 - Core
cowan
major
cowan
fixed
source
closed
2011-07-15 11:31:10
defect

eager, like delay, returns a promise object that can be forced by force, but it evaluates its argument up front (it is a procedure, not syntax) and stashes it in the promise in such a way that force can access it. It comes from SRFI 45 and complements lazy, delay, and force, also from SRFI 45, that we now have.

Semantically, writing (eager expression) is equivalent to writing (let ((value expression)) (delay value)). However, the former is more efficient since it does not require unnecessary creation and evaluation of thunks. And you can't make eager efficient yourself unless you have access to the internals of force.

resolution
statusnewdecided

WG1 accepted this proposal.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed