def choose.retry

cswap-bend-cli@0.1.0.0 · policy/decide.bend:242

import cswap-bend-cli@0.1.0.0/policy/decide.bend as Decide
import Base
import cswap-bend-cli@0.1.0.0/policy/types.bend as T
import cswap-bend-cli@0.1.0.0/policy/pick.bend as K

242# Rank with the bar; if that leaves nothing and the barred account has
243# recovered, rank again without it.
244def choose.retry(+go: Bool, +t: T.Trigger, +as: List<&2, T.Account>, +rk0: K.Rk, +next: T.Decision) -> T.Decision:
245  match go:
246    case True{}:
247      sw.pick(K.rk.bar(rk0, None{}), as, t, next)
248    case False{}:
249      next

Uses (9)

Used by (1)