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.
Returns a list of the form
(e p? d), where
dare applicatives, as follows. Each call to
make-encapsulation-typereturns different applicatives
eis an applicative that takes one argument, and returns a fresh encapsulation with the argument as content. Encapsulations returned on different occasions are not
p?is a primitive type predicate, that takes zero or more arguments and returns true iff all of them are encapsulations generated by
dis an applicative that takes one argument; if the argument is not an encapsulation generated by
e, an error is signaled, otherwise the content of the encapsulation is returned.
That is, the predicate
p?only recognizes, and the decapsulator
donly extracts the content of, encapsulations created by the encapsulator
ethat was returned by the same call to