def within

bolt@1.27.0.0 · src/rules/digest.bend:102

import bolt@1.27.0.0/src/rules/digest.bend as Digest
import 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))

Uses (7)

Used by (1)