Clojure 1.11.0+ now include a function abs in core
(defn abs
{:doc "Returns the absolute value of a.
If a is Long/MIN_VALUE => Long/MIN_VALUE
If a is a double and zero => +0.0
If a is a double and ##Inf or ##-Inf => ##Inf
If a is a double and ##NaN => ##NaN"
:inline-arities #{1}
:inline (fn [a] `(clojure.lang.Numbers/abs ~a))
:added "1.11"}
[a]
(clojure.lang.Numbers/abs a))
Three namespaces require a function named abs and generate warnings
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.math, being replaced by: #'kixi.stats.math/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.test, being replaced by: #'kixi.stats.math/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.distribution, being replaced by: #'kixi.stats.math/abs
It would be nice to add (:refer-clojure :exclude [abs]) in these namespaces. Note it is not an error to exclude a function that is not defined so using an older version of Clojure or ClojureScript will not have an error if you exclude a function that isn't defined in that version.
Clojure 1.11.0+ now include a function
abs
in coreThree namespaces require a function named
abs
and generate warningsIt would be nice to add
(:refer-clojure :exclude [abs])
in these namespaces. Note it is not an error to exclude a function that is not defined so using an older version of Clojure or ClojureScript will not have an error if you exclude a function that isn't defined in that version.