def batches_loop
bendvy-ecs-core@0.1.0.4 · machine_stream.bend:65
import bendvy-ecs-core@0.1.0.4/machine_stream.bend as MachineStream
import Base
import machine.bend as M
import event_runtime.bend as Ev
import machine_stream_queue.bend as Q
65
66def batches_loop(~V: Data,batches: List<&2,Q.Batch<M.Transition<V>>>,acc: List<&2,Ev.Batch<M.Transition<V>>>) -> List<&2,Ev.Batch<M.Transition<V>>>:
67 match batches:
68 case []: List.reverse(&2,Ev.Batch<M.Transition<V>>,acc)
69 case Q.Batch{tick,_,items} <> rest: batches_loop(~V,rest,Ev.Batch{tick,items} <> acc)