 Syntax:

typep
object typespecifier &optional environment
generalizedboolean
 Arguments and Values:

object  an object.
typespecifier  any type specifier except
values, or a type specifier list
whose first element is either function or values.
environment  an environment object.
The default is nil, denoting the null lexical environment
and the and current global environment.
generalizedboolean  a generalized boolean.
 Description:

Returns true if object is of the type specified by typespecifier; otherwise, returns false.
A typespecifier of the form (satisfies fn)
is handled by applying the function fn to object.
(typep object '(array typespecifier)),
where typespecifier is not *,
returns true if and only if object is an array
that could be the result
of supplying typespecifier
as the :elementtype argument to makearray.
(array *) refers to all arrays
regardless of element type, while (array typespecifier)
refers only to those arrays
that can result from giving typespecifier as the
:elementtype argument to makearray.
A similar interpretation applies to (simplearray typespecifier)
and (vector typespecifier).
See Section 15.1.2.1 Array Upgrading.
(typep object '(complex typespecifier))
returns true for all complex numbers that can result from
giving numbers of type typespecifier
to the function complex, plus all other complex numbers
of the same specialized representation.
Both the real and the imaginary parts of any such
complex number must satisfy:
(typep realpart 'typespecifier)
(typep imagpart 'typespecifier)
See the function upgradedcomplexparttype.
 Examples:

(typep 12 'integer) true
(typep (1+ mostpositivefixnum) 'fixnum) false
(typep nil t) true
(typep nil nil) false
(typep 1 '(mod 2)) true
(typep #c(1 1) '(complex (eql 1))) true
;; To understand this next example, you might need to refer to
;; Section 12.1.5.3 Rule of Canonical Representation for Complex Rationals.
(typep #c(0 0) '(complex (eql 0))) false
Let A_{x} and A_{y} be two type specifiers that
denote different types, but for which
(upgradedarrayelementtype 'A_{x})
and
(upgradedarrayelementtype 'A_{y})
denote the same type. Notice that
(typep (makearray 0 :elementtype 'A_{x}) '(array A_{x})) true
(typep (makearray 0 :elementtype 'A_{y}) '(array A_{y})) true
(typep (makearray 0 :elementtype 'A_{x}) '(array A_{y})) true
(typep (makearray 0 :elementtype 'A_{y}) '(array A_{x})) true
 Exceptional Situations:

An error of type error is signaled if typespecifier is values,
or a type specifier list whose first element is either
function or values.
The consequences are undefined if
the typespecifier is not a type specifier.
 See Also:

typeof,
upgradedarrayelementtype,
upgradedcomplexparttype,
Section 4.2.3 Type Specifiers
 Notes:

Implementations are encouraged to recognize and optimize the case of
(typep x (the class y)),
since it does not involve any need for expansion
of deftype information at runtime.
 Allegro CL Implementation Details:

None.