chickadee » coops » define-generic

(define-generic (NAME ARGUMENT ...))syntax

Defines a generic procedure, a procedure specialized for one or more argument types. ARGUMENT ... defines the number of specialized arguments this generic procedure shoud use to dispatch to the correct method. The generic procedure may receive additional arguments, but those will not be used to determine the method. This form is roughly equivalent to

(define NAME
  (make-generic-procedure ARGUMENT ...))

You can use the syntax

(define-generic ((setter NAME) ARGUMENT ...))

to define a SRFI-17 setter on NAME that is itself a generic procedure.