Component.restore_swap: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/component.bend as Component Lines 178-183 of bendvy-ecs-core@0.1.0.3/component.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/component.bend&start_line=178&end_line=183 import Base import column.bend as Col # Inverse closures own their old component, not a copied payload. Replaying # drops the replaced current owner exactly once and restores the journal owner. def restore_swap(~S: Data,~Store: Type,~R: Type,~E: Data,~Rest: Type,~C: Type,~V: Data,~Token: Data,~take: Store -> Rest & Col.Column,~put: Rest -> Col.Column -> Store,~project: C -> C & V,rest: Rest,result: Col.SwapOutcome) -> Store & Unit: match result: case Col.Accepted{column,_}: (put(rest,column),Unit{}) case Col.Rejected{column,_}: (put(rest,column),Unit{}) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/column.bend&name=Column https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.3/column.bend&name=SwapOutcome