(->loc-pred node-pred)
Turn a node predicate into a location predicate.
Turn a node predicate into a location predicate.
(coll-zip root)
A zipper to navigate through any (nested) collection.
A zipper to navigate through any (nested) collection.
(loc-children loc)
Return all the children locations.
Return all the children locations.
(loc-find loc loc-pred)
Find the first location matches a predicate.
Find the first location matches a predicate.
(loc-find-all loc loc-pred)
Find all the locations that match a predicate.
Find all the locations that match a predicate.
(loc-layers loc)
For a given location, return a lazy seq of its 'layers', e.g. children, the children of children and so on.
For a given location, return a lazy seq of its 'layers', e.g. children, the children of children and so on.
(loc-seq loc)
Get a lazy, finite seq of locations.
Get a lazy, finite seq of locations.
(loc-seq-breadth loc)
Return a lazy seq of locations in breadth-first direction (left to right, down, left to right and so on).
Return a lazy seq of locations in breadth-first direction (left to right, down, left to right and so on).
(loc-update loc loc-pred loc-fn & args)
Update locations that match the loc-pred
function
with the loc-fn
functions and the rest arguments.
Returns the last (end) location.
Update locations that match the `loc-pred` function with the `loc-fn` functions and the rest arguments. Returns the last (end) location.
(loc-update-all loc loc-fn & args)
Update all the locations with the loc-fn
and the rest
arguments. Returns the last (end) location.
Update all the locations with the `loc-fn` and the rest arguments. Returns the last (end) location.
(locs-children locs)
For a seq of locations, return their concatenated children.
For a seq of locations, return their concatenated children.
(lookup-down loc loc-pred)
Go down until a location matches a predicate.
Go down until a location matches a predicate.
(lookup-left loc loc-pred)
Go left until a location matches a predicate.
Go left until a location matches a predicate.
(lookup-right loc loc-pred)
Go right until a location matches a predicate.
Go right until a location matches a predicate.
(lookup-up loc loc-pred)
Go up until a location matches a predicate.
Go up until a location matches a predicate.
(node-update loc node-pred node-fn & args)
Like loc-update
but acts on nodes. Updates all the nodes
that match node-pred
with the node-fn
function
and the rest arguments.
Like `loc-update` but acts on nodes. Updates all the nodes that match `node-pred` with the `node-fn` function and the rest arguments.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close