Next: Dynamic Type Inference, Previous: Global Function Type Inference, Up: Type Inference [Contents][Index]
Many of the standard Common Lisp functions have special type inference
procedures that determine the result type as a function of the
argument types. For example, the result type of aref
is the
array element type. Here are some other examples of type inferences:
(logand x #xFF) ⇒ (unsigned-byte 8) (+ (the (integer 0 12) x) (the (integer 0 1) y)) ⇒ (integer 0 13) (ash (the (unsigned-byte 16) x) -8) ⇒ (unsigned-byte 8)