(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.
(cycle-paths g)Return all cycling paths in graph g.
Return all cycling paths in graph g.
(deps ns)Returns all alias and refer dependencies of a namespace.
Returns all alias and refer dependencies of a namespace.
(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.
(merge-graph nss)Given a list of namespace symbols, return a graph that includes the dependency graphs of all of the namespaces.
Given a list of namespace symbols, return a graph that includes the dependency graphs of all of the namespaces.
(plan {sym :symbol rs :roots nss :namespaces repl :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 - (Optional) The root namespaces used to build the graph. Defaults to [ns]. :namespaces - (Optional) Restrict plan to these namespaces. :replace - (Optional) A hashmap of {'original.namespace 'replacement.namespace}.
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 - (Optional) The root namespaces used to build the graph. Defaults to [*ns*].
:namespaces - (Optional) Restrict plan to these namespaces.
:replace - (Optional) A hashmap of {'original.namespace 'replacement.namespace}.(plan-rev {sym :symbol rs :roots nss :namespaces repl :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. Defaults to [ns]. :namespaces - (Optional) Restrict plan to these namespaces. :replace - (Optional) A hashmap of {'original.namespace 'replacement.namespace}.
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. Defaults to [*ns*].
:namespaces - (Optional) Restrict plan to these namespaces.
:replace - (Optional) A hashmap of {'original.namespace 'replacement.namespace}.(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.
(start {i :init :as args})Start a system by running 'start in topological order for all namespaces.
:init - The initial value supplied to reduce. :symbol - The symbol to search for in the graph. Defaults to 'start. :root - The root namespace to initialize the graph. Defaults to ns. :namespaces - (Optional) Restrict initialization to these namespaces. :replace - A hashmap of {'original.namespace 'replacement.namespace}.
Start a system by running 'start in topological order for all namespaces.
:init - The initial value supplied to reduce.
:symbol - The symbol to search for in the graph. Defaults to 'start.
:root - The root namespace to initialize the graph. Defaults to *ns*.
:namespaces - (Optional) Restrict initialization to these namespaces.
:replace - A hashmap of {'original.namespace 'replacement.namespace}.(stop {i :init :as args})Stop a system by running 'stop in topological order for all namespaces.
:init - The system returned from `start. :symbol - The symbol to search for in the graph. Defaults to 'stop. :root - The root namespace to initialize the graph. Defaults to ns. :namespaces - (Optional) Restrict initialization to these namespaces. :replace - A hashmap of {'original.namespace 'replacement.namespace}.
Stop a system by running 'stop in topological order for all namespaces.
:init - The system returned from `start.
:symbol - The symbol to search for in the graph. Defaults to 'stop.
:root - The root namespace to initialize the graph. Defaults to *ns*.
:namespaces - (Optional) Restrict initialization to these namespaces.
:replace - A hashmap of {'original.namespace 'replacement.namespace}.(topo-compare-keyfn g)Given a graph returned by `graph, return a comparator that can be applied to a list of namespace symbols.
Given a graph returned by `graph, return a comparator that can be applied to a list of namespace symbols.
(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.
(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.
(with-sys [binding args] & body)Initialize system, run body, and guarantee proper shutdown. Example usage:
(with-sys [sys {:init {:my-val 123}}] (do-work sys))
Initialize system, run body, and guarantee proper shutdown. Example usage:
(with-sys [sys {:init {:my-val 123}}]
(do-work sys))cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |