Liking cljdoc? Tell your friends :D

nl.jomco.klist

Functions to treat klists as maps.

Klists are sequential collections of maps with a single key-value pair as maps, similar to traditional plists.

These datastructures are slow and mostly useless, so don't use it unless you have to deal with data that is already in this format.

Functions to treat klists as maps.

Klists are sequential collections of maps with a single
key-value pair as maps, similar to traditional plists.

These datastructures are slow and mostly useless, so don't use it
unless you have to deal with data that is already in this format.
raw docstring

assocclj

(assoc m k v)

Like clojure.core/assoc but also works on klists.

Returns a map when m is nil.

Like `clojure.core/assoc` but also works on klists.

Returns a map when m is nil.
sourceraw docstring

assoc-inclj

(assoc-in m [k & ks] v)

Like clojure.core/assoc-in but handles klists like maps.

Like clojure.core/assoc-in, if any level doesn't exist, creates a map at that point.

Like `clojure.core/assoc-in` but handles klists like maps.

Like `clojure.core/assoc-in`, if any level doesn't exist, creates a
map at that point.
sourceraw docstring

getclj

(get m k)
(get m k not-found)

Like clojure.core/get but also works on klists.

Like `clojure.core/get` but also works on klists.
sourceraw docstring

get-inclj

(get-in m ks)
(get-in m [k & ks] not-found)

Like clojure.core/get-in but also works on klists.

Like `clojure.core/get-in` but also works on klists.
sourceraw docstring

klist?clj

(klist? coll)

Test if coll is a klist.

klists are sequential collections where every item is a map of exactly one key/value pair. Empty sequential collections are klists.

Test if `coll` is a klist.

klists are sequential collections where every item is a map of
exactly one key/value pair. Empty sequential collections are
klists.
sourceraw docstring

updateclj

(update m k f & args)

Like clojure.core/update but also works on klists.

If m is nil, returns a map, not a klist

Like `clojure.core/update` but also works on klists.

If m is nil, returns a map, not a klist
sourceraw docstring

update-inclj

(update-in m [k & ks] f & args)

Like clojure.core/update-in but also works on klists.

If any levels do not exist, maps will be created.

Like `clojure.core/update-in` but also works on klists.

If any levels do not exist, maps will be created.
sourceraw docstring

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

× close