ByteWalIo.apply.batch.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend as ByteWalIo Lines 120-135 of mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend&start_line=120&end_line=135 import Base import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal def apply.batch.loop( fuel: Nat, table: ByteMemTable.Table, mutations: List<&1, ByteWal.Mutation> ) -> ByteMemTable.Table: match fuel: case 0n: table case 1n+rest: match mutations: case Nil{}: table case Con{ByteWal.Put{key, value}, tail}: apply.batch.loop(rest, ByteMemTable.put(table, key, value), tail) case Con{ByteWal.Delete{key}, tail}: apply.batch.loop(rest, ByteMemTable.del(table, key), tail) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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=Table https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=del https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=put https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=Mutation