Restore.mutations.entries.loop: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend as Restore Lines 259-277 of mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend&start_line=259&end_line=277 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 mutations.entries.loop( fuel: Nat, mutations: List<&1, ByteWal.Mutation>, reversed: List<&1, ByteMemTable.Entry>, count: Nat ) -> Result<&1, &1, Error, EntryBatch>: match fuel: case 0n: Fail{ResourceLimit{}} case 1n+rest: match mutations: case Nil{}: Done{EntryBatch{List.reverse(&1, ByteMemTable.Entry, reversed), count}} case Con{mutation, tail}: match mutation: case ByteWal.Put{key, value}: mutations.entries.loop(rest, tail, Con{ByteMemTable.Entry{key, Some{value}}, reversed}, Nat.add(count, 1n)) case ByteWal.Delete{_}: Fail{InvalidFormat{}} Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse 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=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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/ByteWal.bend&name=Mutation https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend&name=EntryBatch https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/transfer/Restore.bend&name=Error