(find-at-pos zloc row col)
Find the deepest zloc whose node is at the given row
and col
, seeking
from initial zipper location zloc
.
This is similar to z/find-last-by-pos, but is faster, and doesn't require {:track-position? true}.
Find the deepest zloc whose node is at the given `row` and `col`, seeking from initial zipper location `zloc`. This is similar to z/find-last-by-pos, but is faster, and doesn't require {:track-position? true}.
(find-by-heritability start-zloc inherits?)
Find the deepest zloc from start-zloc
that satisfies inherits?
.
inherits?
must be a function such that if zloc satisifies it then so will
all of its ancestors. If a parent node satisifies inherits?
but none of its
children do, then this returns the parent, on the assumption that the parent
is the last in its lineage with the trait.
This works by scanning right from start-zloc, finding the first ancestor that
satisifies inherits?
, descending into that node, and recurring. As such, it
can be much faster than algorithms based on z/next*, which must inspect all
children and grandchildren, even if information in the grandparent excludes
the entire family.
Find the deepest zloc from `start-zloc` that satisfies `inherits?`. `inherits?` must be a function such that if zloc satisifies it then so will all of its ancestors. If a parent node satisifies `inherits?` but none of its children do, then this returns the parent, on the assumption that the parent is the last in its lineage with the trait. This works by scanning right from start-zloc, finding the first ancestor that satisifies `inherits?`, descending into that node, and recurring. As such, it can be much faster than algorithms based on z/next*, which must inspect all children and grandchildren, even if information in the grandparent excludes the entire family.
(in-range? {:keys [row col end-row end-col] :as _a}
{r :row c :col er :end-row ec :end-col :as _b})
True if b is contained within a.
True if b is contained within a.
(join-let let-loc)
if a let is directly above a form, will join binding forms and remove the inner let
if a let is directly above a form, will join binding forms and remove the inner let
(raise zloc)
Delete siblings and raise node at zloc one level up
[1 [2 |3 4]] => [1 |3]
Delete siblings and raise node at zloc one level up - `[1 [2 |3 4]] => [1 |3]`
(to-top-or-subzip-top loc)
to-top will return nil within a subzip, sometimes that is unwanted
to-top will return nil within a subzip, sometimes that is unwanted
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close