def select_best

cswap-bend-cli@0.1.0.0 · swpick.bend:141

import cswap-bend-cli@0.1.0.0/swpick.bend as Swpick
import Base

141# `_select_best_switchable`: `others` are the switchable, enabled slots but the
142# current one. Switch only to strictly more headroom.
143def select_best(+cur: Maybe<&2, U32>, +others: List<&2, Cand>) -> BestOut:
144  match others:
145    case Nil{}:
146      BNote{"none"}
147    case Con{o, t}:
148      best2(cur, Con{o, t}, best_known(Con{o, t}, Pick{"", 0, False{}}))

Uses (9)

Used by (1)