(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))
위의 방법은 책에서 와서 나는 update
과 :before
의 차이점이 무엇인지에 대해 문의하고 싶었다. CLOS Lisp의 메소드 정의에 대한 나의 이해에서, update
은 메소드의 이름이지만, :before
은 무엇을합니까?리스프 데프 방법 구조
마지막으로 마지막 줄은 무엇입니까? (format T ":BEFORE completed for agent ̃A and event ̃A ̃%" a e))