def isinsetf(s):
  """
  Returns a function which tests whether an element is in a set `s`.
  
  Examples
  --------  
  >>> colors = ['red', 'green', 'blue']
  >>> f = isinsetf(colors)
  >>> map(f, ['yellow', 'green'])
  [False, True]
  """
  s = set(s)
  return lambda e: e in s