def granted.go
import near-architecture@0.9.1.0/arc.bend as Arcimport Base
821def granted.go(xs: List<&2, Grant>, +person: String, +scope: String) -> List<&2, String>:
822 match xs:
823 case []:
824 []
825 case Grant{p, sc, acts} <> rest:
826 pick_list(str_eq(person, p) && str_eq(scope, sc), acts, granted.go(rest, person, scope))