code: def restricted_cover(l, succsOf):
      
      fzl = frozenset(l)
      lut = dict()
      for i in l:
          lut[i] = fzl.intersection(succsOf(i))
      return lambda x: lut[x]
docs: Returns a restricted <succsOf> which only takes and yields
          values from <l>