Continuing the discussion of Lisp features not necessarily encountered by a brief introduction to the language, we come to ftype. This is a declaration, used within a declare, declaim, or proclaim, to provide a hint to the compiler as to what the inputs and outputs are of a particular function. Because Lisp is not strongly typed, it often has to do run-time type checking on operations, and by declaring the types to the compiler, the programmer allows the compiler to avoid those run-time checks, and so can produce better optimized code.
The CLHS provides these examples:
(declare (ftype (function (integer list) t) ith) (ftype (function (number) float) sine cosine))
The first line declares that the function ith takes two arguments, the first being an integer, the second being a list. Its output is declared to be t, which matches any legal Lisp type (i.e. nothing is said about the output type).
The second line declares that the sine and cosine functions each take a numeric argument and return a float. Note that sine and cosine are not the names of those trigonometric functions in the Lisp standard, these will be user-defined functions of non-complex arguments. The types of the standard sin and cos functions are a bit more complicated, as they account for single and double precision real or complex return values.