def inverse_checked
bendvy-ecs-core@0.1.0.4 · relation_commands.bend:110
import bendvy-ecs-core@0.1.0.4/relation_commands.bend as RelationCommands
import Base
import entity_key.bend as Key
import relation_types.bend as G
import world.bend as W
110def inverse_checked(~S: Data,~C: Type,~R: Type,~E: Data,checked: W.World<S,Store<S,C>,R,Notice<S,E>> & Bool,descriptor: G.Descriptor<S>,target: W.Handle<S>) -> W.World<S,Store<S,C>,R,Notice<S,E>> & Maybe<&2,List<&2,Key.Key>>:
111 match checked target:
112 case (world,False{}) _: (world,None{})
113 case (world,True{}) W.Handle{_,id}: inverse_present(~S,~C,~R,~E,W.with_store(~S,~Store<S,C>,~R,~Notice<S,E>,~List<&2,Key.Key>,store => store_inverse(~S,~C,store,descriptor,id),world))