def cleanup_members
bendvy-ecs-core@0.1.0.4 · lifetime_scope.bend:55
import bendvy-ecs-core@0.1.0.4/lifetime_scope.bend as LifetimeScope
import Base
import entity_key.bend as Key
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as A
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G
import bendvy-ecs-core@0.1.0.4/relation_cleanup.bend as Cleanup
55def cleanup_members(~S:Data,~C:Type,~R:Type,~E:Data,~clear:C -> W.Handle<S> -> C & List<&2,A.Notice<S,E>>,~record:W.Handle<S> -> A.Notice<S,E>,~descriptors:List<&2,G.Descriptor<S>>,members:List<&2,Key.Key>,world:W.World<S,A.Store<S,Store<S,C>>,R,A.Notice<S,E>>,+namespace:U32) -> W.World<S,A.Store<S,Store<S,C>>,R,A.Notice<S,E>>:
56 match members:
57 case []:world
58 case id <> rest:cleanup_members(~S,~C,~R,~E,~clear,~record,~descriptors,rest,cleanup_result(~S,~C,~R,~E,Cleanup.automatic(~S,~Store<S,C>,~R,~E,~clear_components(~S,~C,~E,~clear),~record,world,W.Handle{namespace,id},descriptors)),namespace)