Liking cljdoc? Tell your friends :D

com.wallbrew.spoon.compatibility

Functions that provide compatibility with older versions of Clojure.

This allows libraries to be used in projects that are not yet on the latest version of Clojure.

Functions that provide compatibility with older versions of Clojure.

This allows libraries to be used in projects that are not yet on the latest version of Clojure.
raw docstring

update-keysclj/s

(update-keys m f & args)

Return m with f applied to each key in m with its args. A version of this function was added to clojure.core in release 1.11; however, many libraries included this function either in their API or their implementation. This leads consumers to continually receive warnings about shadowed functionality; however, libraries cannot leverage the version in clojure.core without breaking compatibility for consumers using older versions of clojure.

Example:

(update-keys* {:a 2 :b 3} name) ; => {"a" 2 "b" 3}
(update-keys* {} dec) ; => {}
(update-keys* {:b 3 :c 4} str "-key") ; => {":b-key" 3 ":c-key" 4}
Return `m` with `f` applied to each key in `m` with its `args`.
A version of this function was added to `clojure.core` in release 1.11;
  however, many libraries included this function either in their API or their implementation.
This leads consumers to continually receive warnings about shadowed functionality;
  however, libraries cannot leverage the version in `clojure.core` without breaking compatibility for consumers using older versions of clojure.

Example:
```clj
(update-keys* {:a 2 :b 3} name) ; => {"a" 2 "b" 3}
(update-keys* {} dec) ; => {}
(update-keys* {:b 3 :c 4} str "-key") ; => {":b-key" 3 ":c-key" 4}
```
sourceraw docstring

update-valsclj/s

(update-vals m f & args)

Return m with f applied to each val in m with its args. A version of this function was added to clojure.core in release 1.11; however, many libraries included this function either in their API or their implementation. This leads consumers to continually receive warnings about shadowed functionality; however, libraries cannot leverage the version in clojure.core without breaking compatibility for consumers using older versions of clojure.

Example:

(update-vals* {:a 1 :b 2} inc) ; => {:a 2 :b 3}
(update-vals* {} dec) ; => {}
(update-vals* {:b 1 :c 2} + 2) ; => {:b 3 :c 4}
Return `m` with `f` applied to each val in `m` with its `args`.
A version of this function was added to `clojure.core` in release 1.11;
  however, many libraries included this function either in their API or their implementation.
This leads consumers to continually receive warnings about shadowed functionality;
  however, libraries cannot leverage the version in `clojure.core` without breaking compatibility for consumers using older versions of clojure.

Example:
```clj
(update-vals* {:a 1 :b 2} inc) ; => {:a 2 :b 3}
(update-vals* {} dec) ; => {}
(update-vals* {:b 1 :c 2} + 2) ; => {:b 3 :c 4}
```
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close