ByteMemTable.lookup.go: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable Lines 244-264 of mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&start_line=244&end_line=264 import Base # Searches newest-first entries under a structural recursion bound. def lookup.go(fuel: Nat, state: Search) -> Lookup: match fuel: case 0n: match state: case Search{_, entries, prefix, _}: lookup.result(prefix, entries, None{}, False{}) case 1n+rest: match state: case Search{query, entries, prefix, order}: match entries: case Nil{}: lookup.result(prefix, Nil{}, None{}, False{}) case Con{Entry{key, val}, tail}: match order: case EQ{}: lookup.hit.value(val, prefix, key, tail) case LT{}: lookup.go(rest, lookup.advance.state(query, key, val, tail, prefix)) case GT{}: lookup.go(rest, lookup.advance.state(query, key, val, tail, prefix)) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp 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=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Lookup https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Search https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=lookup.advance.state https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=lookup.hit.value https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=lookup.result