def foreign_slot
import cswap-bend-cli@0.1.0.0/swcreds.bend as Swcredsimport Base
import cswap-bend-cli@0.1.0.0/store/base.bend as SBase
import cswap-bend-cli@0.1.0.0/store/seq.bend as SSeq
136def foreign_slot(+live: String, +others: List<&2, Other>) -> Maybe<&2, String>:
137 match others:
138 case Nil{}:
139 None{}
140 case Con{Other{s, c}, t}:
141 SSeq.pick_slot(SBase.nonempty(c) && same_lineage(live, c), s, foreign_slot(live, t))