4 ms·
Clojure has doc and source functions. For example: user=> (doc clojure.core) ------------------------- clojure.core Fundamental library of the Clojur
by mechanicum 2y ago
Clojure has doc and source functions. For example:
user=> (doc clojure.core)
-------------------------
clojure.core
Fundamental library of the Clojure language
user=> (doc +)
-------------------------
clojure.core/+
([] [x] [x y] [x y & more])
Returns the sum of nums. (+) returns 0. Does not auto-promote
longs, will throw on overflow. See also: +'
user=> (source +)
(defn +
"Returns the sum of nums. (+) returns 0. Does not auto-promote
longs, will throw on overflow. See also: +'"
{:inline (nary-inline 'add 'unchecked_add)
:inline-arities >1?
:added "1.2"}
([] 0)
([x] (cast Number x))
([x y] (. clojure.lang.Numbers (add x y)))
([x y & more]
(reduce1 + (+ x y) more)))