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
November 1999