You're viewing version 1.2.0 of odd?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (odd? n)
Returns true if n is odd, throws an exception if n is not an integer

1 Example top

  • user=> (odd? 1)
    true
    user=> (odd? 2)
    false
    user=> (odd? 0)
    false
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/even?

    Returns true if n is even, throws an exception if n is not an integer

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1093 top

(defn odd?
  "Returns true if n is odd, throws an exception if n is not an integer"
  {:added "1.0"}
  [n] (not (even? n)))
Vars in clojure.core/odd?: defn even? not
Used in 1 other vars match

Comments top

No comments for odd?. Log in to add a comment.