def Spans.touches.insertion

bend-lint-rules@0.2.0.0 · lib/text/main.bend:193

import bend-lint-rules@0.2.0.0/lib/text/main.bend as BendLintRules
import Base

193# Whether the span from `b` to `e` touches one of `t`: they share a character, or two insertions are at one place.
194def Spans.touches.insertion(insertion: Bool, +t: Spans, +b: U32, +e: U32) -> Bool:
195  match insertion:
196    case True{}:
197      Spans.has(t, b, e, Spans.cmp(t, b, e))
198    case False{}:
199      False{}

Uses (5)

Used by (1)