DecodeOwnedJournal.rollback: def of bendvy-ecs-core@0.1.0.4 Import: import bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend as DecodeOwnedJournal Lines 32-35 of bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&start_line=32&end_line=35 import Base import bendvy-ecs-core@0.1.0.4/transaction.bend as T def rollback(~World:Type,~P:Type,~Q:Type,receipts:List>,undo:List<(World -> World)>,count:Nat,world:World,owners:List

,pending:List>) -> Returned: match receipts: case []:Returned{T.rollback(~World,undo,world),List.reverse(&1,P,owners),List.reverse(&1,Pending,pending)} case Receipt{+position,inverse} <> rest:unwound(~World,~P,~Q,inverse,(undo => world => owners => pending => rollback(~World,~P,~Q,rest,undo,position,world,owners,pending)),owners,pending,stepped(~World,Nat.sub(count,position),world,undo)) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.reverse https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&name=Pending https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&name=Receipt https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&name=Returned https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&name=stepped https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/decode_owned_journal.bend&name=unwound https://jend.leeeet.dev/definition.txt?path=bendvy-ecs-core@0.1.0.4/transaction.bend&name=rollback