def records
import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWalimport 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
111# Encodes all mutations in their input order.
112def records(
113 mutations: List<&1, Mutation>
114) -> Result<&1, &1, Wal.Error, List<&1, Bytes.Bytes> & U32>:
115 match mutations:
116 case Nil{}:
117 Done{(Nil{}, 0)}
118 case Con{mutation, tail}:
119 records.step(tail, record.encode(mutation), Nil{}, 0)