def cascade
import ezx@1.11.0.0/src/ws/moved.bend as Movedimport Base
289# the members the upgrade moves, from the ones it is asked to. Each round
290# moves at least one more member or ends, and a member moves once, so a
291# round per member the lock records and one more is fuel enough.
292def cascade(+cx: Ctx) -> List<&2, Shift>:
293 Ctx{text, fs, files, +old, +base, only} = cx
294 cascade.go((List.length(&2, Held, old) + 1n : Nat), Ctx{text, fs, files, old, base, only},
295 moves(old, base, base, only))