generic-function?
Das Prädikat generic-function? überprüft, ob sein Argument eine generische Funktion ist.
> (defmethod plus (x y) t (+ x y))
> (generic-function? plus)
t
> (generic-function? nil)
nil
> (generic-function? (quote a))
nil
Das Prädikat ist über die Funktion type-of und einen Vergleich definiert:
(setq generic-function?
(lambda (x)
(eq?
(type-of x)
(quote generic-function))))
> (defmethod plus (x y) t (+ x y))
> (generic-function? plus)
t
> (generic-function? nil)
nil
> (generic-function? (quote a))
nil
Das Prädikat ist über die Funktion type-of und einen Vergleich definiert:
(setq generic-function?
(lambda (x)
(eq?
(type-of x)
(quote generic-function))))