def other_creds
cswap-bend-cli@0.1.0.0 · swlive.bend:158
import cswap-bend-cli@0.1.0.0/swlive.bend as Swlive
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/swcreds.bend as C
import cswap-bend-cli@0.1.0.0/store/io.bend as SIo
158def other_creds(+root: String, +seq: Json.Json, +slots: List<&2, String>, +current: String) -> Act.of(List<&2, C.Other>):
159 match slots:
160 case Nil{}:
161 Act.pure(List<&2, C.Other>, [])
162 case Con{s, t}:
163 do ActM<List<&2, C.Other>>:
164 c : String <- SIo.read_cred(root, s, SIo.slot_email(seq, s))
165 +rest : List<&2, C.Other> <- other_creds(root, seq, t, current)
166 return sel_o(String.eq(s, current), rest, C.Other{s, c} <> rest)