User Tools


Differences

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

Link to this comparison view

cl:functions:evenp [2019/11/11 05:00]
cl:functions:evenp [2019/11/15 20:00] (current)
Line 1: Line 1:
 +====== Function EVENP, ODDP ======
 +
 +====Syntax====
 +  * **evenp** //integer// → //​generalized-boolean//​ **oddp ** //integer// → //​generalized-boolean//​
 +
 +====Arguments and Values====
 +  * //integer// - an //​[[CL:​Glossary:​integer]]//​.
 +  * //​generalized-boolean//​ - a //​[[CL:​Glossary:​generalized boolean]]//​.
 +
 +====Description====
 +**evenp** returns //​[[CL:​Glossary:​true]]//​ if //integer// is even (divisible by two); otherwise, returns //​[[CL:​Glossary:​false]]//​. ​
 +
 +**oddp** returns //​[[CL:​Glossary:​true]]//​ if //integer// odd (not divisible by two); otherwise, returns //​[[CL:​Glossary:​false]]//​. ​
 +
 +====Examples====
 +
 +<​blockquote> ​
 +(evenp 0) → //​[[CL:​Glossary:​true]]// ​
 +(oddp 10000000000000000000000) → //​[[CL:​Glossary:​false]]// ​
 +(oddp -1) → //​[[CL:​Glossary:​true]]// ​
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +Should signal an error of type type-error if //integer// is not an //​[[CL:​Glossary:​integer]]//​.
 +
 +====See Also====
 +None.
 +
 +====Notes====
 +<​blockquote> ​
 +(evenp //​integer//​) ≡ ([[CL:​Functions:​not]] (oddp //​integer//​)) ​
 +(oddp //​integer//​) ≡ ([[CL:​Functions:​not]] (evenp //​integer//​)) ​
 +</​blockquote>​
 +