def hasf(e):
  """
  Returns a function which if applied with `x` tests whether `x` has `e`.
  
  Examples
  --------
  >>> filter(hasf("."), ['statement', 'A sentence.'])
  ['A sentence.']
  """
  return lambda x: e in x