chickadee » fast-generic » define-type

(define-type TYPENAME PREDICATE [BASETYPE])syntax

Defines a named type for objects that satisfy PREDICATE (a procedure of one argument that returns either true or false). If BASETYPE is given, it designates the parent type of TYPENAME. Thus types may form a hierarchy. If BASETYPE is not given, any is assumed.

The predicate should be referentially transparent and not cause any side- effects.