Node:Generic Function Methods, Previous:Generic Functions, Up:Introspection



3.10.5 Generic Function Methods

method-generic-function method primitive procedure
Return the generic function that method belongs to. This is the value of the method metaobject's generic-function slot.

method-specializers method primitive procedure
Return a list of method's formal parameter specializers . This is the value of the method metaobject's specializers slot.

method-procedure method primitive procedure
Return the procedure that implements method. This is the value of the method metaobject's procedure slot.

method-source generic
method-source (m <method>) method
Return an expression that prints to show the definition of method m.
(define-generic cube)

(define-method (cube (n <number>))
  (* n n n))

(map method-source (generic-function-methods cube))
=>
((method ((n <number>)) (* n n n)))