def Spans.lean_left

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

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

81# The node over `l` and `r`, where `l` is two levels higher: turned right, after its left turns left if its inner side
82# is the higher.
83def Spans.lean_left(l: Spans, b: U32, e: U32, r: Spans) -> Spans:
84  match l:
85    case SNode{h, +ll, lb, le, +lr}:
86      Spans.lean_left.if(U32.is_ge(Spans.height(ll), Spans.height(lr)), ll, lb, le, lr, b, e, r)
87    case SLeaf{}:
88      Spans.node(SLeaf{}, b, e, r)

Uses (6)

Used by (1)