The bindings documented in this section are provided by the scheme/promise and scheme libraries, but not scheme/base.
Returns #t if v is a promise, #f otherwise.
Creates a promise that, when forced, evaluates expr to produce its value.
Like delay, except that if expr produces a promise, then this promise is forced to obtain a value. In other words, this form creates a kind of a composable promise, which is mostly useful for implementing lazy libraries and languages. Also note that the expr in this case is restricted to one that produces a single value.
If v is a promise, then the promise is forced to obtain a value. If the promise has not been forced before, then the result is recorded in the promise so that future forces on the promise produce the same value (or values). If forcing the promise raises an exception, then the exception is similarly recorded so that forcing the promise will raise the same exception every time.
If v is not a promise, then it is returned as the result.
Returns #t if promise has been forced.
Returns #t if promise is currently being forced. (Note that a promise can be either running or forced but not both.)