Yes, you can use type specifiers in general lisp, they can be very powerful if your compiler decides to use them. Although you may find use for type checking, the most common types of type specifications are in the form of declarations .
declare expression is used not only for types, but it has a number of identifiers for declarations and general lisp implementations can actually add their own.
You are a little interested, but 'types' and more specifically than 'Type Specifiers' . This page will give you low down various ways to specify types, including what you mentioned in your question.
Remember again that your implementation should not use declarations that it could simply ignore. Here is more information about this.
And for some sample code, here is an example that made me understand the basics of how this works. Here and more here .
From 4.2.3 Type specifiers :
If the type specifier is a list, the list car is a symbol and the rest of the list is auxiliary type information. This type of qualifier is called a composite type specifier. In addition to what is otherwise apparent, auxiliary elements may be unspecified. vague auxiliary items are indicated by writing *. For example, fully indicate the vector, the type of elements and the length of the vector should be.
(vector double-float 100)
The following indicates that the length is undefined:
(vector double-float *)
The following leaves the item type unspecified:
(vector * 100)
source share