User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:functions:atom [2019/07/14 17:00]
cl:functions:atom [2019/07/18 14:00] (current)
Line 1: Line 1:
 +====== Function ATOM ======
  
 +====Syntax====
 +  * **atom** //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:​atom]]**;​ otherwise, returns //​[[CL:​Glossary:​false]]//​.
 +
 +====Examples====
 +<​blockquote>​
 +(atom 'sss) <​r>//​[[CL:​Glossary:​true]]//</​r>​
 +(atom ([[CL:​Functions:​cons]] 1 2) <​r>//​[[CL:​Glossary:​false]]//</​r>​
 +(atom [[CL:​Constant Variable:​nil]]) <​r>//​[[CL:​Glossary:​true]]//</​r>​
 +(atom '()) <​r>//​[[CL:​Glossary:​true]]//</​r>​
 +(atom 3) <​r>//​[[CL:​Glossary:​true]]//</​r>​
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See also====
 +**[[CL:​Functions:​listp|Function LISTP]]**
 +
 +====Notes====
 +<​blockquote>​
 +(atom //object//)
 +  ≡ ([[CL:​Functions:​typep]] //object// '​[[CL:​Types:​atom]])
 +  ≡ ([[CL:​Functions:​not]] ([[CL:​Functions:​consp]] //​object//​))
 +  ≡ ([[CL:​Functions:​not]] ([[CL:​Functions:​typep]] //object// '​[[CL:​Types:​cons]]))
 +  ≡ ([[CL:​Functions:​typep]] //object// '​([[CL:​Types:​not]] [[CL:​Types:​cons]]))
 +</​blockquote>​