Liking cljdoc? Tell your friends :D

lambdaconnect-model.utils


functionisecljmacro

(functionise macro)
source

mapcatclj

(mapcat f coll)
(mapcat f coll acc)
source

mergeclj

(merge & maps)

Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.

Uses transients for speed (up to 2x speedup vs original map)

Returns a map that consists of the rest of the maps conj-ed onto
the first.  If a key occurs in more than one map, the mapping from
the latter (left-to-right) will be the mapping in the result.

Uses transients for speed (up to 2x speedup vs original map)
sourceraw docstring

merge-withclj

(merge-with f & maps)

Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter).

Uses transients for speed (up to 1.5x speedup vs original map-with for large maps)

Returns a map that consists of the rest of the maps conj-ed onto
the first.  If a key occurs in more than one map, the mapping(s)
from the latter (left-to-right) will be combined with the mapping in
the result by calling (f val-in-result val-in-latter).

Uses transients for speed (up to 1.5x speedup vs original map-with for large maps)
sourceraw docstring

rebuild-mapclj

(rebuild-map m f)

Given a map m and a function f of 2 arguments (key, value), Returns new map where entries are build from two-element vectors [k v] f returns. If f returns nil the pair is skipped.

Given a map m and a function f of 2 arguments (key, value), 
Returns new map where entries are build from two-element vectors 
[k v] f returns. If f returns nil the pair is skipped.
sourceraw docstring

update-valsclj

(update-vals m f)

m f => {k (f k v) ...}

Given a map m and a function f of 2-arguments, returns a new map where the keys of m are mapped to result of applying f to the corresponding keys-values of m.

A variation of clojure's update-vals that passes the key to the function as well.

m f => {k (f k v) ...}

Given a map m and a function f of 2-arguments, returns a new map where the keys of m
are mapped to result of applying f to the corresponding keys-values of m.

A variation of clojure's update-vals that passes the key to the function as well.
sourceraw docstring

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

× close