def best_out
cswap-bend-cli@0.1.0.0 · switch.bend:128
import cswap-bend-cli@0.1.0.0/switch.bend as Switch
import Base
import cswap-bend-cli@0.1.0.0/json.bend as Json
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/swbase.bend as B
import cswap-bend-cli@0.1.0.0/swpick.bend as P
import cswap-bend-cli@0.1.0.0/swlive.bend as L
import cswap-bend-cli@0.1.0.0/swrun.bend as R
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
128def best_out(o: P.BestOut, +ctx: SBase.Ctx, +cur: String, +curref: Json.Json, +models: List<&2, String>, +opts: L.Opts, fallthrough: Act.of(Json.Json)) -> Act.of(Json.Json):
129 match o:
130 case P.BPick{slot}:
131 do ActM<Json.Json>:
132 op : Json.Json <- R.do_switch(ctx, slot, False{}, opts)
133 return B.result_of_op(op, "best", [])
134 case P.BNote{+note}:
135 Act.cond(Json.Json, String.eq(note, "none"), fallthrough, Act.pure(Json.Json, note_result(note, cur, curref, models)))