def live_prepend
bendvy-ecs-core@0.1.0.4 · ordinary_app_hierarchy_query.bend:19
import bendvy-ecs-core@0.1.0.4/ordinary_app_hierarchy_query.bend as OrdinaryAppHierarchyQuery
import Base
import bendvy-ecs-core@0.1.0.4/ordinary_app_relation.bend as Relation
import bendvy-ecs-core@0.1.0.4/world.bend as W
19
20
21def live_prepend(~S:Data,~C:Type,~R:Type,~E:Data,selected:Bool,handle:W.Handle<S>,observed:Relation.World(~S,~C,~R,~E) & List<&2,W.Handle<S>>) -> Relation.World(~S,~C,~R,~E) & List<&2,W.Handle<S>>:
22 match selected observed:
23 case True{} Tuple{world,handles}:(world,handle <> handles)
24 case False{} Tuple{world,handles}:(world,handles)