def next_best
import cswap-bend-cli@0.1.0.0/tui/view.bend as Viewimport Base
import cswap-bend-cli@0.1.0.0/tui/model.bend as M
223def next_best(+as: List<&2, M.Acct>, +cur: Maybe<&2, Best>) -> Maybe<&2, Best>:
224 match as:
225 case Nil{}:
226 cur
227 case Con{a, t}:
228 next_best(t, next_pick(eligible(a), a, cur))