defmethod
defmethod(s_name( (s_arg1s_class)s_arg2... )g_exp1... ) =>t
Description
Defines a method for a given generic function. This is a macro form. Be sure to leave a space after s_name.
The method is specialized on the s_class. The method is applicable when classp( s_arg1 s_class ) is true.
Arguments
Value Returned
Examples
defmethod( whatis (( p Point ))
sprintf( nil "%s %s @ %n:%n"
className( classOf( p ))
p->name
p->x
p->y
)
) ; defmethod
=> t
Related Topics
Return to top