ByteWal.records.step: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal Lines 94-109 of mylsm-lsm-store@0.6.0.1/src/ByteWal.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&start_line=94&end_line=109 import Base import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Wal import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Continues record encoding while preserving the first failure. def records.step( rest: List<&1, Mutation>, current: Result<&1, &1, Wal.Error, Bytes.Bytes>, reversed: List<&1, Bytes.Bytes>, count: U32 ) -> Result<&1, &1, Wal.Error, List<&1, Bytes.Bytes> & U32>: match rest current: case Nil{} Fail{error}: Fail{error} case Nil{} Done{bytes}: Done{(List.reverse(&1, Bytes.Bytes, Con{bytes, reversed}), (count + 1 : U32))} case Con{_, _} Fail{error}: Fail{error} case Con{mutation, tail} Done{bytes}: records.step(tail, record.encode(mutation), Con{bytes, reversed}, (count + 1 : U32)) Uses (11): 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=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add 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/ByteWal.bend&name=Mutation https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=record.encode https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Wal.bend&name=Error