(goops.info.gz) Next-method
Info Catalog
(goops.info.gz) Generic functions and methods
(goops.info.gz) Generic functions
(goops.info.gz) Example
Next-method
-----------
When a generic function is called, the list of applicable methods is
built. As mentioned before, the most specific method of this list is
applied (see Generic functions and methods). This method may
call the next method in the list of applicable methods. This is done by
using the special form `next-method'. Consider the following definitions
(define-method (Test (a <integer>)) (cons 'integer (next-method)))
(define-method (Test (a <number>)) (cons 'number (next-method)))
(define-method (Test a) (list 'top))
With those definitions,
(Test 1) => (integer number top)
(Test 1.0) => (number top)
(Test #t) => (top)
Info Catalog
(goops.info.gz) Generic functions and methods
(goops.info.gz) Generic functions
(goops.info.gz) Example
automatically generated byinfo2html