Anonymous user
Delegates: Difference between revisions
common lisp cleanup
(added translation template for common lisp) |
(common lisp cleanup) |
||
Line 75:
=={{header|Common Lisp}}==
{{trans|Python}}
In CLOS, methods exist apart from classes, and are specialized based on the types of their arguments. This example defines two classes (delegator and delegate), and a thing generic method which is specialized in three ways: (1) for 'any' argument, providing a default method; (2) for delegators, where thing is recursively applied to the delegator's delegate (if there is one); and (3) for delegates.
|