def within
import bolt@1.27.0.0/src/rules/digest.bend as Digestimport Base
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
102# is the line in one of the spans?
103def within(ss: List<&2, Span>, +ln: U32) -> Bool:
104 match ss:
105 case Nil{}:
106 False{}
107 case Con{Span{+from, +upto}, rest}:
108 Lazy.or_else(Bool.and(U32.is_le(from, ln), U32.is_le(ln, upto)), _u => within(rest, ln))