Opened 6 years ago

Closed 5 years ago

#234 closed defect (fixed)

Add EAGER from SRFI 45

Reported by: cowan Owned by: cowan
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

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.

Change History (3)

comment:1 Changed 6 years ago by cowan

  • Status changed from new to decided

WG1 accepted this proposal.

comment:2 Changed 6 years ago by cowan

  • Owner changed from alexshinn to cowan
  • Status changed from decided to writing

comment:3 Changed 5 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed
Note: See TracTickets for help on using tickets.