Shared utilities between clojure and clojurescript.
Shared utilities between clojure and clojurescript.
(bigint? x)
Returns true if the supplied x
is a BigInt
, false otherwise.
Returns true if the supplied `x` is a `BigInt`, false otherwise.
(counted f)
(counted f initial-count)
Takes a function and returns a pair of:
Takes a function and returns a pair of: - an atom that keeps track of fn invocation counts, - the instrumented fn
(import-def from-ns def-name)
import a single fn or var:
(import-def a b) => (def b a/b)
import a single fn or var: ```clojure (import-def a b) => (def b a/b) ```
(import-vars & imports)
import multiple defs from multiple namespaces. works for vars and fns. not macros.
import-vars
has the same syntax as potemkin.namespaces/import-vars
:
(import-vars
[m.n.ns1 a b]
[x.y.ns2 d e f]) =>
(def a m.n.ns1/a)
(def b m.n.ns1/b)
...
(def d m.n.ns2/d)
... etc
import multiple defs from multiple namespaces. works for vars and fns. not macros. [[import-vars]] has the same syntax as `potemkin.namespaces/import-vars`: ```clojure (import-vars [m.n.ns1 a b] [x.y.ns2 d e f]) => (def a m.n.ns1/a) (def b m.n.ns1/b) ... (def d m.n.ns2/d) ... etc ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close