MachineStreamQueue.trim_step_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 35-38 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=35&end_line=38 import Base def trim_step_generic(-E: Data,remove: Bool,+tick: Nat,+count: Nat,+items: List<&2,E>,+rest: List<&2,Batch>,+back: List<&2,Batch>,+size: Nat,+dropped: Nat,+batches:Nat,ih: Queue -> Queue) -> Queue: match remove: case False{}: Queue{Batch{tick,count,items} <> rest,back,size,dropped,batches} case True{}: ih(Queue{rest,back,Nat.sub(size,count),Nat.max(dropped,tick),Nat.sub(batches,1n)}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.max https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend&name=Batch https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend&name=Queue