Accessing and Changing Slot Values
Retrieving current state
(slot-value my-square 'x)
0
Changing the state
(setf (slot-value my-square 'x) 10)
10
Syntactic sugar
(with-slots (x) my-square (setq x 15) (print x))
Previous slide
Next slide
Back to first slide
View graphic version