def inverse_remove_acc_erased

bendvy-ecs-core@0.1.0.3 · relation_graph.bend:70

import bendvy-ecs-core@0.1.0.3/relation_graph.bend as RelationGraph
import Base
import entity_key.bend as K
import relation_types.bend as T

70def inverse_remove_acc_erased(-S:Data,entries:List<&2,T.Inverse<S>>,+descriptor:T.Descriptor<S>,+target:K.Key,+source:K.Key,acc:List<&2,T.Inverse<S>>) -> List<&2,T.Inverse<S>>:
71  match entries:
72    case []: List.reverse(&2,T.Inverse<S>,acc)
73    case T.Inverse{+other,+id,sources} <> rest: inverse_remove_acc_erased(S,rest,descriptor,target,source,inverse_remove_one_erased(S,Bool.and(U32.is_eq(key_erased(S,other),key_erased(S,descriptor)),K.equal(id,target)),other,id,sources,source,acc))

Uses (10)

Used by (2)