def sequence
import bendvy-ecs-core@0.1.0.4/ordinary_condition_declaration.bend as OrdinaryConditionDeclarationimport Base
52# Compose programs in authored order, shifting right-side system condition
53# slots by left width. Preserves names/requirements and World-threading routing;
54# does not evaluate predicates or reorder systems by dependency.
55def sequence(~S:Data,~C:Type,~R:Type,~E:Data,~Ids:Data,first:Program<S,C,R,E,Ids>,second:Program<S,C,R,E,Ids>) -> Program<S,C,R,E,Ids>:
56 match first second:
57 case Program{+leftWidth,leftBuild,leftNames,leftEval} Program{rightWidth,rightBuild,rightNames,rightEval}:Program{Nat.add(leftWidth,rightWidth),ids => built_pair(~S,~Ids,leftBuild,rightBuild,leftWidth,ids),List.append(&2,String,leftNames,rightNames),world => slot => evaluated_pair(~S,~C,~R,~E,leftEval,rightEval,leftWidth,world,slot)}
Uses (6)
Used by (0)
No other definition uses this definition.