Register a name as a defdata type
(defun nth-odd-builtin (n) (if (evenp n) (1+ n) (- n))) (register-type odd :predicate oddp :enumerator nth-odd-builtin)
A defdata type expression can either be a typename, a quoted constant or
a combinator or constructor expression. To serve as a typename, a symbol
should either have been defined using the
As an example, after having registered
(defdata odds (listof odd))
(register-type name :predicate pred :enumerator enum [:enum/acc enum2] [:enum/test tenum] [:enum/test/acc tenum2] [:clique tnames] [:normalized-def nexp] [:prettyified-def pexp] ...)Consider the above call of