MachineStreamQueue.trim_generic: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend as MachineStreamQueue Lines 61-63 of bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend&start_line=61&end_line=63 import Base def trim_generic(-E:Data,queue:Queue,boundary:Nat,capacity:Nat) -> Queue: match queue: case Queue{front,back,size,dropped,+batches}:capacity_pass_generic(E,past_loop_generic(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.3/machine_stream_queue.bend&name=Queue https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend&name=capacity_pass_generic https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend&name=past_loop_generic