def children_checked

bendvy-ecs-core@0.1.0.3 · execution_relation_interpreter.bend:36

import bendvy-ecs-core@0.1.0.3/execution_relation_interpreter.bend as ExecutionRelationInterpreter
import Base
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T

36def children_checked(~S:Data,+namespace:U32,children:List<&2,W.Handle<S>>,allocator:A.Allocator,reversed:List<&2,T.ChildStatus>) -> A.Allocator & List<&2,T.ChildStatus>:
37  match children:
38    case []:(allocator,List.reverse(&2,T.ChildStatus,reversed))
39    case +child <> rest:child_next(W.handle_key(~S,child),reversed,allocator => reversed => children_checked(~S,namespace,rest,allocator,reversed),live(~S,namespace,allocator,child))

Uses (11)

Used by (1)