MachineStream.batches_loop: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/machine_stream.bend as MachineStream Lines 65-69 of bendvy-ecs-core@0.1.0.4/machine_stream.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream.bend&start_line=65&end_line=69 import Base import machine.bend as M import event_runtime.bend as Ev import machine_stream_queue.bend as Q # Canonical snapshot includes every retained batch/payload, without changing cursor. def batches_loop(~V: Data,batches: List<&2,Q.Batch>>,acc: List<&2,Ev.Batch>>) -> List<&2,Ev.Batch>>: match batches: case []: List.reverse(&2,Ev.Batch>,acc) case Q.Batch{tick,_,items} <> rest: batches_loop(~V,rest,Ev.Batch{tick,items} <> acc) Uses (5): 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=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=Batch https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine.bend&name=Transition https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend&name=Batch