def inverse_entries

bendvy-ecs-core@0.1.0.4 · relation_graph.bend:39

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

39def inverse_entries(~S: Data,entries: List<&2,T.Inverse<S>>,+descriptor: T.Descriptor<S>,+target: K.Key) -> List<&2,K.Key>:
40  match entries:
41    case []: []
42    case T.Inverse{other,id,sources} <> rest: chosen_inverse(Bool.and(U32.is_eq(key(~S,other),key(~S,descriptor)),K.equal(id,target)),sources,_ => inverse_entries(~S,rest,descriptor,target))

Uses (9)

Used by (1)