def past_normalized_generic
bendvy-ecs-core@0.1.0.3 · machine_stream_queue.bend:40
import bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend as MachineStreamQueue
import Base
40
41
42def past_normalized_generic(-E:Data,queue:Queue<E>,+boundary:Nat,ih:Queue<E> -> Queue<E>) -> Queue<E>:
43 match queue:
44 case Queue{Nil{},back,size,dropped,batches}:Queue{[],back,size,dropped,batches}
45 case Queue{Batch{+tick,+count,+items} <> +rest,+back,+size,+dropped,+batches}:trim_step_generic(E,Nat.is_le(tick,boundary),tick,count,items,rest,back,size,dropped,batches,ih)