store/[org.clojure/clojure "1.8.0"] clj::clojure.core/dec

Official Documentation

Add notes
Arities
==================================================
   [x]

Docstring
==================================================
  Returns a number one less than num. Does not auto-promote
  longs, will throw on overflow. See also: dec'

Source

(defn dec
  "Returns a number one less than num. Does not auto-promote
  longs, will throw on overflow. See also: dec'"
  {:inline (fn [x] `(. clojure.lang.Numbers (~(if *unchecked-math* 'unchecked_dec 'dec) ~x)))
   :added "1.2"}
  [x] (. clojure.lang.Numbers (dec x)))

Example 1

Edit
(dec 2)
;; => 1

(dec 2.0)
;; => 1.0

(dec 1)
;; => 0

(dec -1)
;; => -2

Uses on crossclj