def create
import bendvy-ecs-core@0.1.0.4/world.bend as Worldimport Base
121# Consume the raw Factory and resource owner to construct an empty World, advancing
122# the namespace sequence on success. Namespace exhaustion returns both inputs via
123# CreateRejected. Trusted empty supplies C; use world-io for application creation.
124def create(~S:Data,~C:Type,~R:Type,~E:Data,~empty:Unit -> C,factory:Factory,resource:R) -> Creation<S,C,R,E>:
125 match factory:
126 case Factory{+namespace}:create_checked(~S,~C,~R,~E,~empty,U32.is_lt(namespace,4294967295),namespace,resource)