Interval treeset subset selection.
Interval treeset subset selection.
(-> t lens & body)
Analogue of clojure.core/->
for use with selections.
Takes a selected region t
, a lens
(one of prefix
, selected
or
suffix
) and a body of expressions, and threads the component part value
identified by lens
through body
with clojure.core/->
. The result is
convered to an interval treeset as per edit
, and used as the new
component part value.
Analogue of `clojure.core/->` for use with selections. Takes a selected region `t`, a `lens` (one of [[prefix]], [[selected]] or [[suffix]]) and a body of expressions, and threads the component part value identified by `lens` through `body` with `clojure.core/->`. The result is convered to an interval treeset as per [[edit]], and used as the new component part value.
(->> t lens & body)
Analogue of clojure.core/->>
for use with selections.
Takes a selected region t
, a lens
(one of prefix
, selected
or
suffix
) and a body of expressions, and threads the component part value
identified by lens
through body
with clojure.core/->>
. The result is
convered to an interval treeset as per edit
, and used as the new
component part value.
Analogue of `clojure.core/->>` for use with selections. Takes a selected region `t`, a `lens` (one of [[prefix]], [[selected]] or [[suffix]]) and a body of expressions, and threads the component part value identified by `lens` through `body` with `clojure.core/->>`. The result is convered to an interval treeset as per [[edit]], and used as the new component part value.
(as-> t lens n & body)
Analogue of clojure.core/as->
for use with selections.
Takes a selected region t
, a lens
(one of prefix
, selected
or
suffix
) and a body of expressions, and threads the component part value
identified by lens
through body
with clojure.core/as->
. The result is
convered to an interval treeset as per edit
, and used as the new
component part value.
Analogue of `clojure.core/as->` for use with selections. Takes a selected region `t`, a `lens` (one of [[prefix]], [[selected]] or [[suffix]]) and a body of expressions, and threads the component part value identified by `lens` through `body` with `clojure.core/as->`. The result is convered to an interval treeset as per [[edit]], and used as the new component part value.
(contractl t n)
Contract the covered region to the left by n
items.
Contract the covered region to the left by `n` items.
(contractl-by t pred n)
Contract the covered region to the left until pred
has returned logical
true
n
times.
Contract the covered region to the left until `pred` has returned logical `true` `n` times.
(contractl-while t pred)
Contract the covered region to the left while pred
returns logical true
.
Contract the covered region to the left while `pred` returns logical `true`.
(contractr t n)
Contract the covered region to the right by n
items.
Contract the covered region to the right by `n` items.
(contractr-by t pred n)
Contract the covered region to the right until pred
has returned logical
true
n
times.
Contract the covered region to the right until `pred` has returned logical `true` `n` times.
(contractr-while t pred)
Contract the covered region to the right while pred
returns logical true.
Contract the covered region to the right while `pred` returns logical true.
(edit t lens f & args)
Edit a component part of t
using lens
(one of prefix
,
selected
or suffix
).
f
will be called with the value of the component part as the
first argument, followed by any remaining args
. The result will be converted
to an interval treeset as described below, which will be used as the new value
of the component part, and an updated selection region will be returned.
The result of f
can be either nil
, an interval treeset, or any sequential
type:
nil
will result in an empty interval treeset as the component part value.Edit a component part of `t` using `lens` (one of [[prefix]], [[selected]] or [[suffix]]). `f` will be called with the value of the component part as the first argument, followed by any remaining `args`. The result will be converted to an interval treeset as described below, which will be used as the new value of the component part, and an updated selection region will be returned. The result of `f` can be either `nil`, an interval treeset, or any sequential type: * `nil` will result in an empty interval treeset as the component part value. * An interval treeset will be used as is as the component part value. * Any other sequential type will be poured into an empty interval treeset (created from the original) which will be used as the component part value.
(expandl t n)
Expand the covered region to the left by n
items.
Expand the covered region to the left by `n` items.
(expandl-by t pred n)
Expand the covered region to the left until pred
has returned logical
true
n
times.
Expand the covered region to the left until `pred` has returned logical `true` `n` times.
(expandl-while t pred)
Expand the covered region to the left while pred
returns logical true
.
Expand the covered region to the left while `pred` returns logical `true`.
(expandr t n)
Expand the covered region n
items to the right.
Expand the covered region `n` items to the right.
(expandr-by t pred n)
Expand the covered region to the right until pred
has evaluated to logical
true
n
times.
Expand the covered region to the right until `pred` has evaluated to logical `true` `n` times.
(expandr-while t pred)
Expand the covered region to the right while pred
evaluates to logical
true
Expand the covered region to the right while `pred` evaluates to logical `true`
(overlapping-subset ts ival)
Search this
for all values which overlap ival
.
Search `this` for all values which overlap `ival`.
(prefix t)
(prefix t v)
Lensing function for the prefix component part of a region. Return only the prefix part of this region in the one arg case, set the prefix part in the two arg case.
Lensing function for the prefix component part of a region. Return only the prefix part of this region in the one arg case, set the prefix part in the two arg case.
(selected t)
(selected t v)
Lensing function for the selected component part of a region. Return only the selected part of this region in the one arg case, set the selected part in the two arg case.
Lensing function for the selected component part of a region. Return only the selected part of this region in the one arg case, set the selected part in the two arg case.
(selection pre sel suff)
Create a selection from 3 trees: pre
fix sel
ected and suff
ix.
Create a selection from 3 trees: `pre`fix `sel`ected and `suff`ix.
(slide-left t n)
Slide the covered region left by n
items.
Slide the covered region left by `n` items.
(slide-left-by t pred n)
Slide the covered region left unti pred
has returned logical true
n
times.
Slide the covered region left unti `pred` has returned logical `true` `n` times.
(slide-left-while t pred)
Slide the covered region left while pred
returns logical true
.
Slide the covered region left while `pred` returns logical `true`.
(slide-right t n)
Slide the covered region right by n
items
Slide the covered region right by `n` items
(slide-right-by t pred n)
Slide the covered region right until pred
has returned logical true
n
times.
Slide the covered region right until `pred` has returned logical `true` `n` times.
(slide-right-while t pred)
Slide the covered region right while pred
returns logical true
.
Slide the covered region right while `pred` returns logical `true`.
(suffix t)
(suffix t v)
Lensing function for the suffix component part of a region. Return only the suffix part of this region in the one arg case, set the suffix part in the two arg case.
Lensing function for the suffix component part of a region. Return only the suffix part of this region in the one arg case, set the suffix part in the two arg case.
(transform t lens f & args)
Like edit
, but passes the component value as the last argument to
f
rather than the first.
Like [[edit]], but passes the component value as the _last_ argument to `f` rather than the first.
(unselect t)
Combine prefix
, region
and suffix
back together to form an interval
treeset.
Combine `prefix`, `region` and `suffix` back together to form an interval treeset.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close