-

function/macrosince v0.0-927 clojure.core/-Edit
(- x)
(- x y)
(- x y & more)

Details:

If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.


Examples:

(- 1)
;;=> -1

(- 6 3)
;;=> 3

(- 10 3 2)
;;=> 5

See Also:


Source docstring:
If no ys are supplied, returns the negation of x, else subtracts
the ys from x and returns the result.
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn ^number -
  ([x] (cljs.core/- x))
  ([x y] (cljs.core/- x y))
  ([x y & more] (reduce - (cljs.core/- x y) more)))

Macro code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro ^::ana/numeric -
  ([x] (core/list 'js* "(- ~{})" x))
  ([x y] (core/list 'js* "(~{} - ~{})" x y))
  ([x y & more] `(- (- ~x ~y) ~@more)))