(box! v)
Returns v
inside a mutable box.
Returns `v` inside a mutable box.
(bset! b v)
Sets the value of Box to v
without regard to its current value.
Returns v
.
Sets the value of Box to `v` without regard to its current value. Returns `v`.
(bset-vals! b v)
Sets the value of b
to v
. Returns [old new]
, the values in the
box before and after the reset.
Sets the value of `b` to `v`. Returns `[old new]`, the values in the box before and after the reset.
(bswap! b f)
(bswap! b f x)
(bswap! b f x y)
(bswap! b f x y z)
(bswap! b f x y z & args)
Unsafely swaps the value of the box to be: (apply f current-value-of-box args). Stateful and messy.
Unsafely swaps the value of the box to be: (apply f current-value-of-box args). Stateful and messy.
(bswap-vals! b f)
(bswap-vals! b f x)
(bswap-vals! b f x y)
(bswap-vals! b f x y z)
(bswap-vals! b f x y z & args)
Unsafely swaps the value of the box to be:
(apply f current-value-of-box args).
Returns [old new]
Stateful and messy.
Unsafely swaps the value of the box to be: (apply f current-value-of-box args). Returns `[old new]` Stateful and messy.
(def-short-circuiting-merge name count-fn merge-fn)
Define a short-circuiting merge function. Will use the provided
count-fn
and merge-fn
.
Example:
(def-short-circuiting-merge sc-merge count merge)
Can take advantage of inline
implementations as well.
Define a short-circuiting merge function. Will use the provided `count-fn` and `merge-fn`. Example: (def-short-circuiting-merge sc-merge count merge) Can take advantage of `inline` implementations as well.
(definline name & decls)
Like [[clojure.core/definline]] but also accepts multiple arities.
Like [[clojure.core/definline]] but also accepts multiple arities.
(entry-at m k)
Returns the map-entry mapped to key or nil if key not present.
Returns the map-entry mapped to key or nil if key not present.
(fast-assoc a k v)
Like assoc but only takes one kv pair. Slightly faster.
Like assoc but only takes one kv pair. Slightly faster.
(fast-count coll)
like [[clojure.core/count]] but works only for clojure.lang.Counted collections.
like [[clojure.core/count]] but works only for clojure.lang.Counted collections.
(fast-map-merge x y)
Returns a map that consists of the second of the maps assoc-ed onto the first. If a key occurs in more than one map, the mapping from te latter (left-to-right) will be the mapping in the result.
Returns a map that consists of the second of the maps assoc-ed onto the first. If a key occurs in more than one map, the mapping from te latter (left-to-right) will be the mapping in the result.
(fast-update-in m ks f)
(fast-update-in m ks f a)
(fast-update-in m ks f a b)
(fast-update-in m ks f a b c)
(fast-update-in m ks f a b c & args)
(rmerge! l r)
Returns a transient map that consists of the second of the maps assoc-ed onto the first. If a key occurs in more than one map, the mapping from te latter (left-to-right) will be the mapping in the result.
Returns a transient map that consists of the second of the maps assoc-ed onto the first. If a key occurs in more than one map, the mapping from te latter (left-to-right) will be the mapping in the result.
(short-circuiting-merge count-fn merge-fn)
Return a function which will merge two maps and short circuit if any of them are empty or nil.
Return a function which will merge two maps and short circuit if any of them are empty or nil.
(val-at m k)
(val-at m k nf)
Returns the value mapped to key or nil if key not present.
Returns the value mapped to key or nil if key not present.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close