type-of
Mit type-of kann der Typ des übergebenen Arguments bestimmt werden.
> (type-of 2)
integer
> (type-of 0.5)
ratio
> (type-of "abc")
string
> (type-of (quote abc))
atom
> (type-of (list 1 2 3))
list
> (type-of nil)
list
> (type-of (lambda (x) x))
lambda
> (type-of (make-array (list 3 3 3)))
array
> (type-of (make-hash-table))
hash-table
> (type-of (make-place "192.168.2.103:3677"))
place
Abweichend zu Common Lisp sind Klassen nicht in das System der Typen eingebettet. Der Typ aller Klassen ist class und der Typ aller Instanzen ist instance.
> (type-of (defclass thing ()))
class
> (type-of (allocate-instance thing))
instance
> (type-of 2)
integer
> (type-of 0.5)
ratio
> (type-of "abc")
string
> (type-of (quote abc))
atom
> (type-of (list 1 2 3))
list
> (type-of nil)
list
> (type-of (lambda (x) x))
lambda
> (type-of (make-array (list 3 3 3)))
array
> (type-of (make-hash-table))
hash-table
> (type-of (make-place "192.168.2.103:3677"))
place
Abweichend zu Common Lisp sind Klassen nicht in das System der Typen eingebettet. Der Typ aller Klassen ist class und der Typ aller Instanzen ist instance.
> (type-of (defclass thing ()))
class
> (type-of (allocate-instance thing))
instance