Liking cljdoc? Tell your friends :D

org.dthume.data.interval-treeset.selection

Interval treeset subset selection.

Interval treeset subset selection.
raw docstring

->cljmacro

(-> 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.
raw docstring

->>cljmacro

(->> 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.
raw docstring

as->cljmacro

(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.
raw docstring

contractlclj

(contractl t n)

Contract the covered region to the left by n items.

Contract the covered region to the left by `n` items.
raw docstring

contractl-byclj

(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.
raw docstring

contractl-whileclj

(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`.
raw docstring

contractrclj

(contractr t n)

Contract the covered region to the right by n items.

Contract the covered region to the right by `n` items.
raw docstring

contractr-byclj

(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.
raw docstring

contractr-whileclj

(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.
raw docstring

editclj

(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.
  • 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.
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.
raw docstring

expandlclj

(expandl t n)

Expand the covered region to the left by n items.

Expand the covered region to the left by `n` items.
raw docstring

expandl-byclj

(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.
raw docstring

expandl-whileclj

(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`.
raw docstring

expandrclj

(expandr t n)

Expand the covered region n items to the right.

Expand the covered region `n` items to the right.
raw docstring

expandr-byclj

(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.
raw docstring

expandr-whileclj

(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`
raw docstring

overlapping-subsetclj

(overlapping-subset ts ival)

Search this for all values which overlap ival.

Search `this` for all values which overlap `ival`.
raw docstring

prefixclj

(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.
raw docstring

selectedclj

(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.
raw docstring

selectionclj

(selection pre sel suff)

Create a selection from 3 trees: prefix selected and suffix.

Create a selection from 3 trees: `pre`fix `sel`ected and `suff`ix.
raw docstring

slide-leftclj

(slide-left t n)

Slide the covered region left by n items.

Slide the covered region left by `n` items.
raw docstring

slide-left-byclj

(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.
raw docstring

slide-left-whileclj

(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`.
raw docstring

slide-rightclj

(slide-right t n)

Slide the covered region right by n items

Slide the covered region right by `n` items
raw docstring

slide-right-byclj

(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.
raw docstring

slide-right-whileclj

(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`.
raw docstring

suffixclj

(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.
raw docstring

transformclj

(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.
raw docstring

unselectclj

(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.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close