def reset_tx
import bendvy-ecs-core@0.1.0.4/machine.bend as Machineimport Base
import transaction.bend as Tx
127def reset_tx(~S: Data,~M: Data,~V: Data,~W: Type,~E: Data,
128 ~take: W -> W & Slot<S,M,V>,~put: W -> Slot<S,M,V> -> W,
129 tx: Tx.Tx<W,E>) -> Tx.Tx<W,E>:
130 match tx:
131 case Tx.Tx{world,undo,commands,events,trace}:
132 reset_taken(~S,~M,~V,~W,~E,~put,take(world),undo,commands,events,trace)