We have already seen how a before and an after piece of advice may be combined, and this section describes the general algorithm. There are three types of advice: before , after and around . These resemble before, after and around methods in CLOS. There may be several pieces of each type of advice present for a particular function.
The first step in working out how the combination is done is to order the pieces of advice. All the around advice comes first, then all the before advice, then the original definition, and lastly the after advice. The order within each of the around, before and after sections defaults to the order in which the pieces of advice were defined (that is most recent first). See defadvice for details of how to control the ordering of advice within each section.
The remainder of this section discusses what happens when a function that has advice is called.