Liking cljdoc? Tell your friends :D

schism.impl.types.nesting-util

Utility functions for supporting nested collections.

Utility functions for supporting nested collections.
raw docstring

access-pathclj/s

(access-path reconstitution-path)

flat returns a reconstitution path of both type and key. This is useful for reprojecting the flat version up into a nested structure, but is not amenable to get-in, assoc-in, et al. access-path will convert a reconstitution path into a more conventional access path.

`flat` returns a reconstitution path of both type and key. This is
useful for reprojecting the flat version up into a nested structure,
but is not amenable to `get-in`, `assoc-in`, et al. `access-path` will
convert a reconstitution path into a more conventional access path.
sourceraw docstring

clean*clj/s

(clean* m [k & ks])

Remove the key at k and any empty parents above it.

Remove the key at k and any empty parents above it.
sourceraw docstring

compare-pathsclj/s

(compare-paths [[a-type a-val :as first-a] & rest-a :as a]
               [[b-type b-val :as first-b] & rest-b :as b])
source

finalize-projection-keyclj/s

(finalize-projection-key m)
source

flatclj/s

(flat c)

Flattens a structure of associatives and sequentials to an associative of paths to leaf values. Each step in a path will retain both the type and the edge value, maps will be flattened to associatives. Vectors, lists, and other seqs will be flattened to sequentials.

Flattens a structure of associatives and sequentials to an
associative of paths to leaf values. Each step in a path will retain
both the type and the edge value, maps will be flattened to
associatives. Vectors, lists, and other seqs will be flattened to
sequentials.
sourceraw docstring

nested-updateclj/s

(nested-update original provenance update author timestamp)

Does all of the book-keeping for nested map/vector combo data types. original is the original data structure, provenance is the original structure's provenance data, update is a update function to progress original. Returns positionally: the updated original, and, the updated provenance.

Does all of the book-keeping for nested map/vector combo data types.
`original` is the original data structure, `provenance` is the
original structure's provenance data, `update` is a update function
to progress original.
Returns positionally: the updated `original`, and, the updated `provenance`.
sourceraw docstring

projectclj/s

(project vals)
(project vals basis)

Constitutes a structure as produced by flat up into a nested collection of maps and vectors. As all sequential items are coerced to vectors, this is not reflexive of flat.

Constitutes a structure as produced by `flat` up into a nested
collection of maps and vectors. As all sequential items are coerced
to vectors, this is not reflexive of `flat`.
sourceraw docstring

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

× close