def subtree_put
bendvy-ecs-core@0.1.0.3 · execution_composer_layout.bend:245
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as ExecutionComposerLayout
import Base
import bendvy-ecs-core@0.1.0.3/owner_product.bend as Product
245def subtree_put(~S:Data,layout:Layout,route:Route,rest:subtree_rest(~S,layout,route),selected:columns(~S,subtree(layout,route))) -> columns(~S,layout):
246 match layout route rest:
247 case _ AtLeaf{} _:selected
248 case EmptyLayout{} InLeft{_} rest:rest
249 case EmptyLayout{} InRight{_} rest:rest
250 case LayoutLeaf{_,V,_,_,_} InLeft{_} rest:rest
251 case ClassifiedLayoutLeaf{_,V,_,_,_,_} InLeft{_} rest:rest
252 case LayoutLeaf{_,V,_,_,_} InRight{_} rest:rest
253 case ClassifiedLayoutLeaf{_,V,_,_,_,_} InRight{_} rest:rest
254 case LayoutPair{left,right} InLeft{path}, (outer,inner):Product.Owner{subtree_put(~S,left,path,inner,selected),outer}
255 case LayoutPair{left,right} InRight{path}, (outer,inner):Product.Owner{outer,subtree_put(~S,right,path,inner,selected)}