The function
describe
displays the slots of composite data structures in a manner dependent on the type of the object. The slots are labeled with a name where appropriate, or otherwise with a number.
The example below shows the result of calling
describe
on a simple list.
USER 7 > (setq countries '("Chile" "Peru" "Paraguay"
"Brazil"))
("Chile" "Peru" "Paraguay" "Brazil")
USER 8 > (describe countries)
("Chile" "Peru" "Paraguay" "Brazil") is a CONS
[0] : "Chile"
[1] : "Peru"
[2] : "Paraguay"
[3] : "Brazil"
describe
describes slots recursively up to a limit set by the special variable
*describe-level*
. Note that only arrays, structures and conses are printed recursively. The slots of all other object types are only printed when at the top level of
describe
.
*describe-level*
has an initial value of 2.
The symbols
*describe-print-level*
and
*describe-print-length*
are similar in effect to
*trace-print-level*
and
*trace-print-length*
. They control, respectively, the depth to which nested objects are printed (initial value 10), and the number of components of an object which are printed (initial value 10).
To customize
describe
, define new methods on the generic function
describe-object
.