1.3.0 permalink Arrow_down_16x16

unchecked-dec

clojure.core

  • (unchecked-dec x)
Returns a number one less than x, a long.
Note - uses a primitive operator subject to overflow.

1 Example top

  • user=> (unchecked-dec 4)
    3
    
    user=> (unchecked-dec Integer/MIN_VALUE)
    2147483647
    
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1105 top

(defn unchecked-dec
  "Returns a number one less than x, a long.
  Note - uses a primitive operator subject to overflow."
  {:inline (fn [x] `(. clojure.lang.Numbers (unchecked_dec ~x)))
   :added "1.0"}
  [x] (. clojure.lang.Numbers (unchecked_dec x)))
Vars in clojure.core/unchecked-dec:
Used in 0 other vars

Comments top

No comments for unchecked-dec. Log in to add a comment.