def compose

bendvy-ecs-core@0.1.0.4 · ordinary_bundle.bend:22

import bendvy-ecs-core@0.1.0.4/ordinary_bundle.bend as OrdinaryBundle
import Base
import schema_fragments.bend as SF
import bundle_pack.bend as Pack

22# Append head/tail component entries and derive matching nested Pack types.
23# Preserves heterogeneous affine payload shapes without receiving live payloads;
24# collisions are checked by request, not by this composition step.
25def compose(~S:Data,~HR:Type,~HC:Type,~TR:Type,~TC:Type,head:Plan<S,HR,HC>,tail:Plan<S,TR,TC>) -> Plan<S,Pack.Pack<HR,TR>,Pack.Pack<HC,TC>>:
26  match head tail:
27    case Plan{heads} Plan{tails}:Plan{List.append(&2,SF.Entry<S>,heads,tails)}

Uses (4)

Used by (0)

No other definition uses this definition.