def normalize

bendvy-ecs-core@0.1.0.4 · machine_stream_queue.bend:30

import bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend as MachineStreamQueue
import 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}

Uses (4)

Used by (2)