Name

typecase

Usage

macro

Syntax

(typecase keyform normal-clause* [otherwise-clause])

Description

normal-clause := '(' type form* ')'
otherwise-clause := '(' {true|otherwise} form* ')'
type := symbol corresponding to a (imported) class
user 1 > (let s 'aap)
it: aap
user 2 > (typecase s
             (integer
                  (print-line 1))
             (symbol
                  (print-line 2))
             (otherwise
                  (print-line 3)))
2
it: null