ByteMemTable.payload.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 449-455 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=449&end_line=455 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Sums key and present-value byte lengths over the mutation log. def payload.go(entries: List<&1, Entry>, total: Nat) -> Nat: match entries: case Nil{}: total case Con{Entry{Bytes.Bytes{+len, _}, val}, tail}: payload.go(tail, Nat.add(Nat.add(total, U32.to_nat(len)), payload.value(val))) Uses (7): 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=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes 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=payload.value