speculative.optional. Not requiring this namespace before instrumenting has
significant performance benefit.Running the first 20 coal-mine test sets in cljs+node, compare
"Elapsed time: 3198.731217 msecs"
to
"Elapsed time: 21343.952922 msecs"
merge-with spec:user=> (merge-with assoc {:a 1} [:a :b])
Execution error (ClassCastException) at user$eval164/invokeStatic (REPL:1).
clojure.lang.Keyword cannot be cast to java.util.Map$Entry
becomes
user=> (merge-with + {:a 1} [:a :b])
Evaluation error - invalid arguments to clojure.core/merge-with at (NO_SOURCE_FILE:15).
:a - failed: map-entry? at: [:maps :rest-maps] spec: :speculative.core/map-entry
:b - failed: map-entry? at: [:maps :rest-maps] spec: :speculative.core/map-entry
speculative.test macros gentest and check renamed to check and check-call to closer resemble naming in clojure.spec.test.alphaspeculative.test no longer needs require to clojure.spec.test.alpha in CLJS (#95)=, /, apply (clj only), assoc, count, every?, filter,
first, get, juxt, not-any?, not-every?, range, partial,
remove, reset!, swap!, some, some? and str.speculative.test with tools around clojure.spec.test.alpha. More
info here.map, filter, merge, merge-with, fnil
and reduce.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |