next up previous
Contents Next: first (FUNCTION) Up: Appendix: Selected Lisp Previous: eval (FUNCTION)

evenp, oddp (PREDICATES)

Format: (evenp <num> ) (oddp <num> )

Required arguments: 1

<num> : any Lisp expression that evaluates to an integer.

Returns T if the value of <num> is even (odd); NIL otherwise.

Examples:

> (oddp 3)
T

> (oddp 68)
NIL

> (evenp 4.0)
Error: 4.0 is not of type INTEGER.



© Colin Allen & Maneesh Dhagat
March 2007