def range_disjoint_bounds
mylsm-lsm-store@0.6.0.1 · src/SortedRun.bend:165
import mylsm-lsm-store@0.6.0.1/src/SortedRun.bend as SortedRun
import Base
import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys
165
166def range_disjoint_bounds(
167 af: Maybe<&2, String>,
168 al: Maybe<&2, String>,
169 bf: Maybe<&2, String>,
170 bl: Maybe<&2, String>
171) -> Bool:
172 match af al bf bl:
173 case None{} _ _ _:
174 True{}
175 case _ None{} _ _:
176 True{}
177 case _ _ None{} _:
178 True{}
179 case _ _ _ None{}:
180 True{}
181 case Some{a_first} Some{a_last} Some{b_first} Some{b_last}:
182 bool_or(Keys.lt(a_last, b_first), Keys.lt(b_last, a_first))