Function: oddp

oddp is a byte-compiled function defined in subr.el.gz.

Signature

(oddp INTEGER)

Documentation

Return t if INTEGER is odd.

Other relevant functions are documented in the number group.

View in manual

Probably introduced at or before Emacs version 31.1.

Shortdoc

;; number
(oddp 3)
    => t

Aliases

cl-oddp

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun oddp (integer)
  "Return t if INTEGER is odd."
  (declare (ftype (function (integer) boolean))
           (pure t) (side-effect-free t)
           (compiler-macro (lambda (_) `(not (eq (% ,integer 2) 0)))))
  (not (eq (% integer 2) 0)))