NextPrevUpTopContentsIndex

3.2.6.2 Referencing types via predicates

If you do not wish to retain CLOS, and are referencing types that have built-in predicates, or structure types, you could use these predicates instead of the type names to allow delivery to remove unused types. For example this code:

(typecase x
  (integer (process-an-integer x))
  (string (process-a-string x))
  (a-struct (process-a-struct x)))

could be rewritten as:

(cond ((integerp x) (process-an-integer x))
      ((stringp x) (process-a-string x))
      ((a-struct-p x) (process-a-struct x)))

LispWorks Delivery User Guide - 14 Mar 2008

NextPrevUpTopContentsIndex