User Tools

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

====== Function CONSP ====== ====Syntax==== * **consp** //object// → //generalized-boolean// ====Arguments and Values==== * //object// - an //[[CL:Glossary:object]]//. * //generalized-boolean// - a //[[CL:Glossary:genralized boolean]]//. ====Description==== Returns //[[CL:Glossary:true]]// if //object// is of //[[CL:Glossary:type]]// **[[CL:Types:cons]]**; otherwise, returns //[[CL:Glossary:false]]//. ====Examples==== <blockquote> (consp [[CL:Constant Variable:nil]]) <r>//[[CL:Glossary:false]]//</r> (consp ([[CL:Functions:cons]] 1 2)) <r>//[[CL:Glossary:true]]//</r> (consp '()) <r>//[[CL:Glossary:false]]//</r> ; ≡ (consp '[[CL:Constant Variable:nil]]) ≡ (consp [[CL:Constant Variable:nil]]) </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== None. ====Example Implementation==== These are all equivalent: <blockquote> (consp //object//) ([[CL:Functions:typep]] //object// '[[CL:Types:cons]]) ([[CL:Functions:not]] ([[CL:Functions:atom]] //object//)) ([[CL:Functions:not]] ([[CL:Functions:typep]] //object// '[[CL:Types:atom]])) ([[CL:Functions:typep]] //object// '([[CL:Types:not]] [[CL:Types:atom]])) </blockquote> ====Notes==== None.