MemTable.scan_hit: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable Lines 116-133 of mylsm-lsm-store@0.6.0.1/src/MemTable.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/MemTable.bend&start_line=116&end_line=133 import Base import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys # Scan hit for the in-memory table operations. def scan_hit( fuel: Nat, +key: String, st: (Bool & Maybe<&2, Maybe<&2, String>>), entries: List<&2, Entry> ) -> Maybe<&2, Maybe<&2, String>>: match fuel: case 0n: (done, ans) = st ans case 1n+f: (done, ans) = st match entries: case Nil{}: ans case Con{Entry{ekey, val}, t}: scan_hit(f, key, scan_hit_step(done, Keys.eq(ekey, key), val, ans), t) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Keys.bend&name=eq https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/MemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/MemTable.bend&name=scan_hit_step