Next: , Previous: Continuations, Up: Top


11 Encapsulations

An encapsulation is an object that refers to another object, called its content. The Kernel data type encapsulation is encapsulated. Two encapsulations are equal? iff they are eq?. Encapsulations are immutable.

— Applicative: make-encapsulation-type (make-encapsulation-type)

Returns a list of the form (e p? d), where e, p?, and d are applicatives, as follows. Each call to make-encapsulation-type returns different applicatives e, p?, and d.

That is, the predicate p? only recognizes, and the decapsulator d only extracts the content of, encapsulations created by the encapsulator e that was returned by the same call to make-encapsulation-type.