BendLintRules.Spans.add: def of bend-lint-rules@0.2.0.0 Import: import bend-lint-rules@0.2.0.0/lib/text/main.bend as BendLintRules Lines 146-154 of bend-lint-rules@0.2.0.0/lib/text/main.bend: https://jend.leeeet.dev/read.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&start_line=146&end_line=154 import Base # `t` with the span from `b` to `e`; `side` is how it compares with the root's. def Spans.add(t: Spans, +b: U32, +e: U32, side: Cmp) -> Spans: match t side: case SLeaf{} _: SNode{1, SLeaf{}, b, e, SLeaf{}} case SNode{h, +l, x, y, r} LT{}: Spans.balance(Spans.add(l, b, e, Spans.cmp(l, b, e)), x, y, r) case SNode{h, l, x, y, +r} _: Spans.balance(l, x, y, Spans.add(r, b, e, Spans.cmp(r, b, e))) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Spans https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Spans.balance https://jend.leeeet.dev/definition.txt?path=bend-lint-rules@0.2.0.0/lib/text/main.bend&name=Spans.cmp