3.11Typeclassπ i
This library defines some macros that provide ad-hoc polymorphism
similar to typeclasses, although lacking some of the crucial features
of typeclasses such as typeclass constraints. These typeclasses are
added entirely through meta-programming.
Declares a new typeclass named class, whose parameter
param has type Type. Implementations of this
typeclass must define of the methods name... whose types
are t....
Example:
(equal?:(->(a:A)(b:A)Bool )))
( impl (classparam)defs...)
Provides an implementation of the typeclass class for the
type param. The defintions defs... are Cur
definitions for each of the methods of the typeclass.
Examples: