def normalize
import bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend as MachineStreamQueueimport Base
30def normalize(~E: Data,queue: Queue<E>) -> Queue<E>:
31 match queue:
32 case Queue{Nil{},back,size,dropped,batches}: Queue{List.reverse(&2,Batch<E>,back),[],size,dropped,batches}
33 case Queue{front,back,size,dropped,batches}: Queue{front,back,size,dropped,batches}