def swaps
import ezx@1.11.0.0/src/ws/moved.bend as Movedimport Base
import ezx@1.11.0.0/src/ledger/upgrade.bend as U
162# the moves as the rewrites they make
163def swaps(ms: List<&2, Shift>) -> List<&2, U.Swap>:
164 match ms:
165 case []:
166 []
167 case Shift{_name, old, new} <> tl:
168 U.Swap{old, new} <> swaps(tl)