def select_next
import cswap-bend-cli@0.1.0.0/swpick.bend as Swpickimport Base
55# Walk `cs` (already in rotation order, current slot excluded) as switch() does.
56# `avail` is next-available: skip accounts with no headroom.
57def select_next(+cs: List<&2, Cand>, +avail: Bool) -> Sel:
58 match cs:
59 case Nil{}:
60 SelNone{[], False{}}
61 case Con{c, rest}:
62 sel_step(avail, c, select_next(rest, avail))