(defmethod update :before ((a AGENT) (e UPDATE))
(when (null (timestamps a))
(push 0 (pls a))
(push 0 (fitnesses a)))
(push (timestamp e) (timestamps a))
(push (price e) (revalprices a))
(preprocess a e)
(format T ":BEFORE completed for agent ̃A and event ̃A ̃%" a e))
The above method came from a book and I wanted to inquire about what is the difference between update
and :before
. From my understanding from defining methods in CLOS Lisp, the update
is the name of the method, but what does :before
do?
Lastly what does the last line do? (format T ":BEFORE completed for agent ̃A and event ̃A ̃%" a e))