(compute cache k remapper-fn)
see: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html#compute-K-java.util.function.BiFunction-
Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). For example, to either create or append a String msg to a value mapping:
(compute cache "k" (fn [k, v] (if (nil? v) msg (str v msg)))
see: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentMap.html#compute-K-java.util.function.BiFunction- Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping). For example, to either create or append a String msg to a value mapping: `(compute cache "k" (fn [k, v] (if (nil? v) msg (str v msg)))`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close