User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function LISTP ====== ====Syntax==== * **listp** //object// → //generalized-boolean// ====Arguments and Values==== * //object// - an //[[CL:Glossary:object]]//. * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. ====Description==== Returns //[[CL:Glossary:true]]// if //object// is of //[[CL:Glossary:type]]// **[[CL:Types:list]]**; otherwise, returns //[[CL:Glossary:false]]//. ====Examples==== <blockquote> (listp nil) <r>//[[CL:Glossary:true]]//</r> (listp ([[CL:Functions:cons]] 1 2)) <r>//[[CL:Glossary:true]]//</r> (listp ([[CL:Functions:make-array]] 6)) <r>//[[CL:Glossary:false]]//</r> (listp t) <r>//[[CL:Glossary:false]]//</r> </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== None. ====See Also==== **[[CL:Functions:consp|Function CONSP]]** ====Example Implementation==== <blockquote> (listp //object//) ≡ ([[CL:Functions:typep]] //object// '[[CL:types:list]]) ≡ ([[CL:Functions:typep]] //object// '([[CL:types:or]] [[CL:types:cons]] [[CL:types:null]])) </blockquote> ====Notes==== If //object// is a //[[CL:Glossary:cons]]//, **listp** does not check whether //object// is a //[[CL:Glossary:proper list]]//; it returns //[[CL:Glossary:true]]// for any kind of //[[CL:Glossary:list]]//.