def replace_inverse_erased

bendvy-ecs-core@0.1.0.3 · relation_reorder_core.bend:52

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

52def replace_inverse_erased(-S: Data,entries: List<&2,T.Inverse<S>>,+d: T.Descriptor<S>,+parent: K.Key,+sources: List<&2,K.Key>) -> List<&2,T.Inverse<S>>:
53  match entries:
54    case []: []
55    case T.Inverse{+other,+id,old} <> rest: replaced_erased(S,Bool.and(U32.is_eq(C.key_erased(S,d),C.key_erased(S,other)),K.equal(parent,id)),T.Inverse{other,id,old},sources,replace_inverse_erased(S,rest,d,parent,sources))

Uses (9)

Used by (2)