A closure is a procedure object, generated as the value of a lambda expression in Scheme. The representation of a closure is straightforward -- it contains a pointer to the code of the lambda expression from which it was created, and a pointer to the environment it closes over.
In Guile, each closure also has a property list, allowing the system to store information about the closure. I'm not sure what this is used for at the moment -- the debugger, maybe?
Return non-zero iff x is a closure.
Return the property list of the closure x. The results are undefined if x is not a closure.
Set the property list of the closure x to p. The results are undefined if x is not a closure.
Return the code of the closure x. The result is undefined if x is not a closure.
This function should probably only be used internally by the interpreter, since the representation of the code is intimately connected with the interpreter's implementation.
Return the environment enclosed by x. The result is undefined if x is not a closure.
This function should probably only be used internally by the interpreter, since the representation of the environment is intimately connected with the interpreter's implementation.