kawa.lang
Class Promise

java.lang.Object
  extended by kawa.lang.Promise
All 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
 java.lang.Object force()
           
 void print(Consumer out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Promise

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

Method Detail

force

public java.lang.Object force()
                       throws java.lang.Throwable
Throws:
java.lang.Throwable

print

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