kawa.lang

Class Promise

Implemented Interfaces:
Printable

public class Promise
extends java.lang.Object
implements Printable

Implement Scheme "promises".

Constructor Summary

Promise(Procedure thunk)
Create a new Promise that will evaluate thunk when forced.

Method Summary

Object
force()
void
print(Consumer out)

Constructor Details

Promise

public Promise(Procedure thunk)
Create a new Promise that will evaluate thunk when forced.

Method Details

force

public Object force()
            throws Throwable

print

public void print(Consumer out)
Specified by:
print in interface Printable