User Tools


Differences

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

Link to this comparison view

cl:functions:functionp [2019/06/15 02:00]
cl:functions:functionp [2019/09/16 13:00] (current)
Line 1: Line 1:
 +====== Function FUNCTIONP ======
 +
 +====Syntax====
 +  * **functionp** //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:​function]]**;​ otherwise, returns //​[[CL:​Glossary:​false]]//​.
 +
 +====Examples====
 +<​blockquote>​
 +(functionp '​[[CL:​Functions:​append]]) <​r>//​[[CL:​Glossary:​false]]//​ </r>
 +(functionp #'​[[CL:​Functions:​append]]) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +(functionp ([[CL:​Functions:​symbol-function]] '​[[CL:​Functions:​append]])) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +([[CL:​Special Operators:​flet]] ((f () 1)) (functionp #'f)) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +(functionp ([[CL:​Functions:​compile]] [[CL:​Constant Variables:​nil]] '​([[CL:​Macros:​lambda]] () 259))) <​r>//​[[CL:​Glossary:​true]]//​ </r>
 +(functionp [[Cl:​Constant Variables:​nil]]) <​r>//​[[CL:​Glossary:​false]]//​ </r>
 +(functionp 12) <​r>//​[[CL:​Glossary:​false]]//​ </r>
 +(functionp '​([[CL:​Macros:​lambda]] (x) ([[CL:​Functions:​math-multiply|*]] x x))) <​r>//​[[CL:​Glossary:​false]]//​ </r>
 +(functionp #'​([[CL:​Symbols:​lambda]] (x) ([[CL:​Functions:​math-multiply|*]] x x))) <​r>//​[[CL:​Glossary:​true]]//</​r>​
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See Also====
 +None.
 +
 +====Notes====
 +<​blockquote>​ (functionp //object//) ≡ (typep //object// '​function) </​blockquote>​
 +
 +\issue{FUNCTION-TYPE:​X3J13-MARCH-88}