def committed
import bendvy-ecs-core@0.1.0.4/machine_handler_engine.bend as MachineHandlerEngineimport Base
import bendvy-ecs-core@0.1.0.4/machine.bend as M
51def committed(~S:Data,~K:Data,~V:Data,slot:M.Slot<S,K,V>,from:V,to:V) -> M.Slot<S,K,V>:
52 match slot:
53 case M.Missing{}: M.Missing{}
54 case M.Present{_,pending,_,_}: M.Present{to,pending,Some{from},True{}}