def compare

mylsm-lsm-store@0.6.0.1 · src/scan/BlockOrder.bend:19

import mylsm-lsm-store@0.6.0.1/src/scan/BlockOrder.bend as BlockOrder
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

19# Requires each new key to sort strictly after the preceding key.
20def compare(previous: Maybe<&1, Bytes.Bytes>, key: Bytes.Bytes) -> Bool:
21  match previous:
22    case None{}: True{}
23    case Some{last}:
24      compare.result(Keys.Bytes.cmp.with_inputs(last, key))

Uses (5)

Used by (1)