Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS

Class silk.Closure

java.lang.Object
    |
    +----silk.SchemeUtils
            |
            +----silk.Procedure
                    |
                    +----silk.Closure
Subclasses:
Macro

public class Closure
extends Procedure
A closure is a user-defined procedure. It is "closed" over the environment in which it was created. To apply the procedure, bind the parameters to the passed in variables, and evaluate the body.


Fields inherited from class silk.SchemeUtils
 FALSE, ONE, TRUE, ZERO
 

Constructor Summary
 Closure(java.lang.Object parms, java.lang.Object body, Environment env)
Make a closure from a parameter list, body, and environment.
 

Method Summary
java.lang.Object  apply(Scheme interpreter, java.lang.Object args)
Apply a closure to a list of arguments.
 
Methods inherited from class silk.Procedure
 apply, toString
 
Methods inherited from class silk.SchemeUtils
 chr, chr, cons, equal, eqv, error, first, inPort, length, list, list, listStar, listToString, listToVector, num, num, outPort, rest, reverse, second, setFirst, setRest, str, sym, third, truth, truth, vec, vectorToList, warn, write
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Closure

public Closure(java.lang.Object parms,
               java.lang.Object body,
               Environment env)
Make a closure from a parameter list, body, and environment.
Method Detail

apply

public java.lang.Object apply(Scheme interpreter,
                    java.lang.Object args)
Apply a closure to a list of arguments.
Overrides:
apply in class Procedure

Class | Tree | Deprecated | Index | Help
PREV | NEXT SHOW LISTS | HIDE LISTS