Liking cljdoc? Tell your friends :D

com.potetm.lightweaver


cycle-nodeclj

(cycle-node g)

Walk from the known root of the tree to the cycle, find the shortest path to a cycle, and return the last node before the cycle occurs.

For example, a cycle of [a b c b] will return c.

Walk from the known root of the tree to the cycle, find the shortest path to
a cycle, and return the last node before the cycle occurs.

For example, a cycle of [a b c b] will return c.
sourceraw docstring

cycle-pathsclj

(cycle-paths g)

Return all cycling paths in graph g.

Return all cycling paths in graph g.
sourceraw docstring

depsclj

(deps ns)

Returns all alias and refer dependencies of a namespace.

Returns all alias and refer dependencies of a namespace.
sourceraw docstring

dups?clj

(dups? coll)
source

graphclj

(graph)
(graph ns)

Given a root namespace, returns a hashmap of ns -> set-of-namespaces-that-depend-on-ns.

Given a root namespace, returns a hashmap of ns -> set-of-namespaces-that-depend-on-ns.
sourceraw docstring

merge-graphclj

(merge-graph nss)

Given a list of namespace symbols, return a graph that includes the dependency graphs of all the namespaces.

Given a list of namespace symbols, return a graph that includes the
dependency graphs of all the namespaces.
sourceraw docstring

namespacesclj

(namespaces nss)

A transducer that will restrict a plan to the provided set of namespaces.

A transducer that will restrict a plan to the provided set of namespaces.
sourceraw docstring

planclj

(plan {sym :com.potetm.lightweaver/symbol
       rs :com.potetm.lightweaver/roots
       xf :com.potetm.lightweaver/xf})

Given var search criteria, return the list of vars in topological order.

::symbol - The var symbol to search for in the graph (e.g. 'start). ::roots - The root namespaces used to build the graph. ::xf - xform to apply to the sorted namespaces. See also namespaces,replace.

Given var search criteria, return the list of vars in topological order.

::symbol - The var symbol to search for in the graph (e.g. 'start).
::roots - The root namespaces used to build the graph.
::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
sourceraw docstring

plan-revclj

(plan-rev {sym :com.potetm.lightweaver/symbol
           rs :com.potetm.lightweaver/roots
           xf :com.potetm.lightweaver/xf})

Given var search criteria, return the list of vars in reverse topological order.

::symbol - The var symbol to search for in the graph (e.g. 'stop). ::roots - The root namespaces used to build the graph. ::xf - xform to apply to the sorted namespaces. See also namespaces,replace.

Given var search criteria, return the list of vars in reverse topological
order.

::symbol - The var symbol to search for in the graph (e.g. 'stop).
::roots - The root namespaces used to build the graph.
::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
sourceraw docstring

plan-xfclj

(plan-xf sym)
source

replaceclj

(replace kmap)

A transducer that takes a hashmap of {'original.namespace 'replacement.namespace} and replaces namespaces (e.g. for testing).

A transducer that takes a hashmap of {'original.namespace 'replacement.namespace}
and replaces namespaces (e.g. for testing).
sourceraw docstring

requiring-resolveclj

(requiring-resolve ns sym)
source

runclj

(run init vars)

Reduce over namespaces running sym if it can be resolved and ignoring the namespace if sym cannot be resolved.

Reduce over namespaces running sym if it can be resolved and ignoring the
namespace if sym cannot be resolved.
sourceraw docstring

startclj

(start sys)

Start a system by running 'start in topological order for all namespaces.

::symbol - The symbol to search for in the graph. Defaults to 'start. ::roots - The root namespaces to initialize the graph. ::xf - xform to apply to the sorted namespaces. See also namespaces,replace.

Start a system by running 'start in topological order for all namespaces.

::symbol - The symbol to search for in the graph. Defaults to 'start.
::roots - The root namespaces to initialize the graph.
::xf - xform to apply to the sorted namespaces. See also `namespaces, `replace.
sourceraw docstring

stopclj

(stop sys)

Stop a system by running 'stop in topological order for all namespaces.

::symbol - The symbol to search for in the graph. Defaults to 'stop. ::roots - The root namespaces to initialize the graph. (Usually provided from `start.)

Stop a system by running 'stop in topological order for all namespaces.

::symbol - The symbol to search for in the graph. Defaults to 'stop.
::roots - The root namespaces to initialize the graph. (Usually provided from `start.)
sourceraw docstring

topo-sortclj

(topo-sort g)
(topo-sort ret g)

Given a graph returned by `graph, sort all namespaces topologically.

If supplied a list () as ret, the return will be reverse topologically sorted.

Given a graph returned by `graph, sort all namespaces topologically.

If supplied a list () as ret, the return will be reverse topologically sorted.
sourceraw docstring

topo-sort-revclj

(topo-sort-rev g)

Given a graph returned by `graph, reverse sort all namespaces topologically.

Given a graph returned by `graph, reverse sort all namespaces topologically.
sourceraw docstring

with-syscljmacro

(with-sys [binding args] & body)

Initialize system, run body, and guarantee proper shutdown. Example usage:

(with-sys [sys {:my-val 123 ::roots '[my.root.ns]}] (do-work sys))

Initialize system, run body, and guarantee proper shutdown. Example usage:

(with-sys [sys {:my-val 123
                ::roots '[my.root.ns]}]
  (do-work sys))
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close