1.3.0 permalink Arrow_down_16x16
  • (- x)
  • (- x y)
  • (- x y & more)
If no ys are supplied, returns the negation of x, else subtracts
the ys from x and returns the result. Does not auto-promote
longs, will throw on overflow. See also: -'

1 Example top

  • user=> (- 1)
    -1 
    user=> (- 6 3)  
    3
    user=> (- 10 3 2)  
    5
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/-'

    If no ys are supplied, returns the negation of x, else subtracts the y

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:978 top

(defn -
  "If no ys are supplied, returns the negation of x, else subtracts
  the ys from x and returns the result. Does not auto-promote
  longs, will throw on overflow. See also: -'"
  {:inline (nary-inline 'minus 'unchecked_minus)
   :inline-arities >0?
   :added "1.2"}
  ([x] (. clojure.lang.Numbers (minus x)))
  ([x y] (. clojure.lang.Numbers (minus x y)))
  ([x y & more]
     (reduce1 - (- x y) more)))
Vars in clojure.core/-:
Used in 0 other vars

Comments top

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