def event_publish

bendvy-ecs-core@0.1.0.4 · world.bend:262

import bendvy-ecs-core@0.1.0.4/world.bend as World
import Base

262# An empty publication changes no field and needs no traversal of retained events.
263# Append detached Data events in list order and return World. Empty input preserves
264# World. This does not synchronize typed event Runtime batches/readers or run systems.
265def event_publish(~S: Data,~C: Type,~R: Type,~E: Data,world: World<S,C,R,E>,+published: List<&2,E>) -> World<S,C,R,E>:
266  match published:
267    case []: world
268    case head <> rest: event_publish_nonempty(~S,~C,~R,~E,world,head <> rest)

Uses (3)

Used by (11)