File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -774,6 +774,8 @@ Some common, idiomatic aliases are shown below:
774774| Namespace | Idiomatic Alias
775775| clojure.java.io
776776| io
777+ | clojure.math
778+ | math
777779| clojure.set
778780| set
779781| clojure.string
@@ -2137,6 +2139,21 @@ Try to use `swap!` rather than `reset!`, where possible.
21372139(reset! a 5)
21382140----
21392141
2142+ == Math
2143+
2144+ === Prefer `clojure.math` Functions Over Interop [[prefer-clojure-math-over-interop]]
2145+
2146+ Prefer math functions from `clojure.math` over (Java) interop or rolling your own.
2147+
2148+ [source,clojure]
2149+ ----
2150+ ;; good
2151+ (clojure.math/pow 2 5)
2152+
2153+ ;; okish
2154+ (Math/pow 2 5)
2155+ ----
2156+
21402157== Strings
21412158
21422159=== Prefer `clojure.string` Functions Over Interop [[prefer-clojure-string-over-interop]]
You can’t perform that action at this time.
0 commit comments