MachineStreamQueue.trim: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend as MachineStreamQueue Lines 61-63 of bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend&start_line=61&end_line=63 import Base def trim(~E:Data,queue:Queue,boundary:Nat,capacity:Nat) -> Queue: match queue: 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): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend&name=Queue https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend&name=capacity_pass https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/machine_stream_queue.bend&name=past_loop