EventStream.advance: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/event_stream.bend as EventStream Lines 45-49 of bendvy-ecs-core@0.1.0.4/event_stream.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&start_line=45&end_line=49 import Base import bendvy-ecs-core@0.1.0.4/event_runtime.bend as Ev # Activate id if needed then advance its cursor to tick. Trusted completion # operation, not an independent registration/provenance validation. def advance(~S:Data,~E:Data,stream:Stream,+id:U32,+tick:Nat) -> Stream: match stream: case Stream{domain,batches,positions,nextReader,frameStart,boundary,capacity,dropped}:Stream{domain,batches,Ev.update(Ev.activate(positions,id,Nat.sub(tick,1n)),id,tick,False{}),nextReader,frameStart,boundary,capacity,dropped} 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=activate https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=update https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&name=Stream