def undo_checked
bendvy-ecs-core@0.1.0.4 · recoverable_component.bend:56
import bendvy-ecs-core@0.1.0.4/recoverable_component.bend as RecoverableComponent
import Base
import bendvy-ecs-core@0.1.0.4/world.bend as W
import bendvy-ecs-core@0.1.0.4/column.bend as Col
56
57
58def undo_checked(~S:Data,~P:Type,~R:Type,~E:Data,record:Record<S,P>,checked:W.World<S,Col.Column<S,P>,R,E> & Bool) -> W.World<S,Col.Column<S,P>,R,E> & Record<S,P>:
59 match checked:
60 case (world,False{}):(world,record)
61 case (world,True{}):undo_valid(~S,~P,~R,~E,record,world)