User Tools


Function EVENP, ODDP

Syntax

  • evenp integergeneralized-boolean oddp integergeneralized-boolean

Arguments and Values

Description

evenp returns true if integer is even (divisible by two); otherwise, returns false.

oddp returns true if integer odd (not divisible by two); otherwise, returns false.

Examples

(evenp 0) → true (oddp 10000000000000000000000) → false (oddp -1) → true

Side Effects

None.

Affected By

None.

Exceptional Situations

Should signal an error of type type-error if integer is not an integer.

See Also

None.

Notes

(evenp integer) ≡ (not (oddp integer)) (oddp integer) ≡ (not (evenp integer))