4 ms·
1. The values of :after methods are ignored. 2. You're calling person-age from within the method so you enter infinite recursion. What you were looking for is:
by Hexstream 16y ago
1. The values of :after methods are ignored.
2. You're calling person-age from within the method so you enter infinite recursion.
What you were looking for is:
(defmethod person-age :around ((someone person))
(let* ((age (call-next-method))
(category (if (< age 16)
:child
(if (>= age 66)
:senior
:adult))))
(values age category)))
- mahmud 16y agoyeah, I am on a pristine box without slime; and those written after a few beers late at night.