+

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

Details:

Returns the sum of nums.

(+) returns 0.


Examples:

(+)
;;=> 0

(+ 1)
;;=> 1

(+ -10)
;;=> -10

(+ 1 2)
;;=> 3

(+ 1 2 3)
;;=> 6

See Also:


Source docstring:
Returns the sum of nums. (+) returns 0.
Function code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn ^number +
  ([] 0)
  ([x] 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 +
  ([] 0)
  ([x] x)
  ([x y] (core/list 'js* "(~{} + ~{})" x y))
  ([x y & more] `(+ (+ ~x ~y) ~@more)))