def put_column

bendvy-ecs-core@0.1.0.4 · ordinary_lifetime_scope.bend:152

import bendvy-ecs-core@0.1.0.4/ordinary_lifetime_scope.bend as OrdinaryLifetimeScope
import Base
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as Sc
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/column.bend as Col

152# Trusted schema reconstruction: consume the matching ComponentRest and column
153# to rebuild the wrapped Store, preserving membership and relation graph.
154# It does not itself change scope membership or apply structural commands.
155def put_column(~S:Data,~C:Type,~Rest:Type,~P:Type,~put:Rest -> Col.Column<S,P> -> C,rest:ComponentRest<S,Rest>,column:Col.Column<S,P>) -> A.Store<S,Sc.Store<S,C>>:
156  match rest:
157    case ComponentRest{rest,members,graph}:A.Store{Sc.Store{put(rest,column),members},graph}

Uses (4)

Used by (1)