def providers
import near-architecture@0.9.1.0/arc.bend as Arcimport Base
575# Keys of the containers that provide `want`.
576def providers(+want: Cap, xs: List<&2, Container>) -> List<&2, String>:
577 match xs:
578 case []:
579 []
580 case +c <> rest:
581 cons_if(Nat.is_gt(count_in(want, caps(c)), 0n), ckey(c), providers(want, rest))