EventPublication.synced: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/event_publication.bend as EventPublication Lines 50-54 of bendvy-ecs-core@0.1.0.4/event_publication.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&start_line=50&end_line=54 import Base import world.bend as W import event_runtime.bend as Ev import event_stream.bend as Leaf def synced(~S:Data,~C:Type,~R:Type,~A:Data,~B:Data,~H:Type,observed:W.World> & List<&2,Publication>,streams:Streams,+journal:List<&2,Ev.Batch>>,+tick:Nat,frameStart:Nat) -> Application: match observed streams: case (world,items) Streams{first,second,owners}: +published=List.drop(&2,Publication,items,Ev.size(~Publication,journal)) Application{world,Streams{Leaf.append(~S,~A,first,tick,first_values(~A,~B,published)),Leaf.append(~S,~B,second,tick,second_values(~A,~B,published)),owners},Ev.sync_checked(~Publication,Nat.is_lt(0n,Ev.count(~Publication,published)),journal,tick,published),tick,frameStart} Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&name=Application https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&name=Publication https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&name=Streams https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&name=first_values https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_publication.bend&name=second_values https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=Batch https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=count https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=size https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_runtime.bend&name=sync_checked https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/event_stream.bend&name=append https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/world.bend&name=World