Tutorial by Examples

Lets say we have a class as (defclass person () (name email age)) To obtain the names of the slots of the class we use the function class-slots. This can be found in the closer-mop package, provided by the closer-mop system. To load it the running lisp image we use (ql:quickload :closer-mop)....
The CLOS MOP provides the hook slot-value-using-class, that is called when a slot is value is accessed, read or modified. Because we only care for modifications in this case we define a method for (setf slot-value-using-class). (defclass document () ((id :reader id :documentation "A hash co...

Page 1 of 1