Liking cljdoc? Tell your friends :D

dag_unify.core


*exclude-keys*clj/s

source

*local-keys*clj/s

source

add-indicesclj/s

(add-indices elements values)
source

aliases-ofclj/s

(aliases-of path reentrance-sets)

given path and a set of set of paths, for each subset s, if a member m1 of s is a prefix of path, concatenate each member other m2 of s to remainder(m2,path).

given _path_ and a set of set of paths, for each subset s,
if a member m1 of s is a prefix of _path_, concatenate
each member other m2 of s to remainder(m2,path).
sourceraw docstring

all-refsclj/s

(all-refs input)
source

annotateclj/s

(annotate fs & [firsts path x y path-sets])
source

assoc-inclj/s

(assoc-in m path v)

Similar to clojure.core/assoc-in, but uses unification so that existing values are unified rather than overwritten.

Similar to clojure.core/assoc-in, but uses unification so that existing values are unified rather than overwritten.
sourceraw docstring

assoc-in!clj/s

(assoc-in! m path v)

Similar to assoc-in, but m's references (if any) are modified.

Similar to assoc-in, but m's references (if any) are modified.
sourceraw docstring

by-rowsclj/s

(by-rows fs)
source

copyclj/s

(copy input)
source

count-refs-in-pathclj/s

(count-refs-in-path path fs)
source

create-path-inclj/s

(create-path-in path value)

create a path starting at map through all keys in map: (create-path-in '(a b c d e) value) => {:a {:b {:c {:d {:e value}}}}})

create a path starting at map through all keys in map:
(create-path-in '(a b c d e) value) => {:a {:b {:c {:d {:e value}}}}})
sourceraw docstring

create-shared-valuesclj/s

(create-shared-values serialized)
source

deref-mapclj/s

(deref-map input)
source

deserializeclj/s

(deserialize serialized)
source

deserialize-with-removeclj/s

(deserialize-with-remove serialized pred)
source

dissoc-inclj/s

(dissoc-in structure path)

dissoc a path in a dag, as well as any other path in the dag to the same value.

dissoc a path in a dag, as well as any other path in the dag to the same value.
sourceraw docstring

dissoc-in-all-pathsclj/s

(dissoc-in-all-paths value paths)
source

dissoc-in-mapclj/s

(dissoc-in-map the-map path)

dissoc a nested path from the-map; e.g.: (dissoc-in {:a {:b 42, :c 43}} [:a :b]) => {:a {:c 43}}.

dissoc a nested path from the-map; e.g.:
(dissoc-in {:a {:b 42, :c 43}} [:a :b]) => {:a {:c 43}}.
sourceraw docstring

dissoc-pathclj/s

(dissoc-path serialized path)
source

elementsclj/s

(elements fs)
source

elements-of-rowclj/s

(elements-of-row elements row)
source

exceptionclj/s

(exception error-string)
source

exists?clj/s

(exists? the-map path)
source

fail-pathclj/s

(fail-path fs1 fs2)
source

fail-path-betweenclj/s

(fail-path-between fs1 fs2)

If unifying fs1 and fs2 leads to a fail somewhere, show the path to the fail. Otherwise return nil. Not efficient: use only for diagnostics.

If unifying fs1 and fs2 leads to a fail somewhere, show the path to the fail. Otherwise return nil. Not efficient: use only for diagnostics.
sourceraw docstring

fail-path-rclj/s

(fail-path-r fs & [fs-keys])

find the first failing path in a fs.

find the first failing path in a fs.
sourceraw docstring

fail?clj/s

(fail? fs)

(fail? fs) <=> true if at least one of fs's path's value is :fail.

(fail? fs) <=> true if at least one of fs's path's value is :fail.
sourceraw docstring

failr?clj/s

(failr? fs keys)
source (clj)source (cljs)

find-fail-inclj/s

(find-fail-in fs1 fs2 paths)
source

find-paths-to-valueclj/s

(find-paths-to-value map value path)

find all paths in map which are equal to value, where value is (ref?)=true.

find all paths in _map_ which are equal to _value_, where _value_ is (ref?)=true.
sourceraw docstring

gather-annotationsclj/s

(gather-annotations fs & [firsts path annotate])
source

get-inclj/s

(get-in in-map path & [not-found])

same as clojure.core (get-in), but references are resolved and followed.

same as clojure.core (get-in), but references are resolved and followed.
sourceraw docstring

get-remainders-forclj/s

(get-remainders-for aliases-of-path reentrance-set)
source

has-pathclj/s

(has-path path paths)
source

heightclj/s

(height fs & [firsts path])
source

index-of-refclj/s

(index-of-ref path path-sets & [i])
source

is-first-ref?clj/s

(is-first-ref? path sets)
source

isomorphic?clj/s

(isomorphic? a b)
source

key-rankclj/s

(key-rank k keys)
source

label-ofclj/s

(label-of parent)
source

max-lengthsclj/s

(max-lengths serialization)
source

merge-with-keysclj/s

(merge-with-keys arg1 arg2 keys-of-arg1)
source

nonfailclj/s

(nonfail maps)
source

paddingclj/s

(padding value width)
source

path-to-ref-indexclj/s

(path-to-ref-index serialized path n)
source

pathifyclj/s

(pathify fs & [prefix])

Transform a map into a map of paths/value pairs, where paths are lists of keywords, and values are atomic values. e.g.: {:foo {:bar 42, :baz 99}} => { { (:foo :bar) 42}, {(:foo :baz) 99} } The idea is to map the key :foo to the (recursive) result of pathify on :foo's value.

Transform a map into a map of paths/value pairs,
 where paths are lists of keywords, and values are atomic values.
 e.g.:
 {:foo {:bar 42, :baz 99}} =>  { { (:foo :bar) 42}, {(:foo :baz) 99} }
The idea is to map the key :foo to the (recursive) result of pathify on :foo's value.
sourceraw docstring

pathsclj/s

(paths fs)
source

pprintclj/s

(pprint input)
source

prefix?clj/s

(prefix? a b)

return true iff seq a is a prefix of seq b: (prefix? [:a ] [:a :b]) => true (prefix? [:a :b] [:a ]) => false (prefix? [:a :b] [:a :c]) => false

return true iff seq a is a prefix of seq b:
(prefix? [:a   ] [:a :b])    => true
(prefix? [:a :b] [:a   ])    => false
(prefix? [:a :b] [:a :c]) => false
sourceraw docstring

(print-out fs)
source

rank-withinclj/s

(rank-within path fs)
source

recursive-dissocclj/s

(recursive-dissoc a-map pred)

like dissoc, but works recursively. Only works on reference-free maps (contains no atoms).

like dissoc, but works recursively. Only works on reference-free maps (contains no atoms).
sourceraw docstring

ref-skel-mapclj/s

(ref-skel-map input-map)

associate each reference in input-map with:

  1. its skeleton
  2. all paths to point to it.
associate each reference in _input-map_ with:
1. its skeleton
2. all paths to point to it.
sourceraw docstring

ref=clj/s

(ref= map path1 path2)
source

ref?clj/s

(ref? val)
source

remainderclj/s

(remainder a b)

if seq a is a prefix of seq b, then return what is left of b besides the common prefix of a. if seq a is not a prefix, return nil.

if seq a is a prefix of seq b,
then return what is left of b besides
the common prefix of a.
if seq a is not a prefix, return nil.
sourceraw docstring

remove-matching-keysclj/s

(remove-matching-keys fs pred)
source

remove-top-valuesclj/s

(remove-top-values fs)

Remove any <key,value> pair in the input fs if value=:top. Use case is logging where we don't care about uninformative key->value pairs where value is simply :top. Also strips refs for readability.

Remove any <key,value> pair in the input _fs_ if value=:top. Use case is logging where we don't care about uninformative key->value pairs where value is simply :top. Also strips refs for readability.
sourceraw docstring

resolveclj/s

(resolve arg)

if arg is not a ref, return arg. if is a ref, return (resolve @arg)

if arg is not a ref, return arg. if is a ref, return (resolve @arg)
sourceraw docstring

ser-intermedclj/s

(ser-intermed input-map)
source

serializeclj/s

(serialize input-map)
source

simple-unifyclj/s

source

simplify-refclj/s

(simplify-ref arg)

if arg is a ref and @arg is not a ref, return arg. if @arg is also a ref, return (simplify-ref @arg). else, return arg.

if arg is a ref and @arg is not a ref, return arg. if @arg is also a ref, return (simplify-ref @arg). else, return arg.
sourceraw docstring

skeletizeclj/s

(skeletize input-val)
source

skelsclj/s

(skels input-map refs)

create map from reference to their skeletons.

create map from reference to their skeletons.
sourceraw docstring

sort-by-max-lengthsclj/s

(sort-by-max-lengths serialization)
source

sort-shortest-path-ascending-rclj/s

(sort-shortest-path-ascending-r serialization path-length-pairs)
source

strip-refsclj/s

(strip-refs map-with-refs)
source

unifyclj/s

(unify & args)

like unify!, but non-destructively copy each argument before unifying.

like unify!, but non-destructively copy each argument before unifying.
sourceraw docstring

unify!clj/s

(unify! val1)
(unify! val1 val2 & rest-args)

destructively merge arguments, where arguments are maps possibly containing references, so that sharing relationship in the arguments is preserved in the result

destructively merge arguments, where arguments are maps possibly containing references, so that 
sharing relationship in the arguments is preserved in the result
sourceraw docstring

unifycclj/s

(unifyc & args)

alias for (defn unify)

alias for (defn unify)
sourceraw docstring

widthclj/s

(width fs & [firsts path])
source

width-of-cellclj/s

(width-of-cell cell)
source

width-of-columnclj/s

(width-of-column elements column)
source

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

× close