def trim

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

import bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend as MachineStreamQueue
import Base

61def trim(~E:Data,queue:Queue<E>,boundary:Nat,capacity:Nat) -> Queue<E>:
62  match queue:
63    case Queue{front,back,size,dropped,+batches}:capacity_pass(~E,past_loop(~E,Nat.add(batches,1n),Queue{front,back,size,dropped,batches},boundary),capacity)

Uses (5)

Used by (1)