BlockOrder.compare: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend as BlockOrder Lines 19-24 of mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend&start_line=19&end_line=24 import Base import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Requires each new key to sort strictly after the preceding key. def compare(previous: Maybe<&1, Bytes.Bytes>, key: Bytes.Bytes) -> Bool: match previous: case None{}: True{} case Some{last}: compare.result(Keys.Bytes.cmp.with_inputs(last, key)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Keys.bend&name=Bytes.cmp.with_inputs https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend&name=compare.result