def with_resource
bendvy-ecs-core@0.1.0.4 · ordinary_machine_initialization.bend:8
import bendvy-ecs-core@0.1.0.4/ordinary_machine_initialization.bend as OrdinaryMachineInitialization
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
8
9def with_resource(~S:Data,~C:Type,~R:Type,~E:Data,~Out:Type,effect:R -> R & Out,world:W.World<S,C,R,E>) -> W.World<S,C,R,E> & Out:
10 match world:
11 case W.World{+namespace,allocator,store,resource,+events,pending,+registrations,+nextSystemId,+clock}:W.observe_resource_finish(~S,~C,~R,~E,~Out,effect(resource),namespace,allocator,store,events,pending,registrations,nextSystemId,clock)