def splitf(delim):
  """ 
  Returns a function that splits string with a given delimiter.
  
  Examples
  --------
  >>> f = splitf(", ")
  >>> f('apples, pears, oranges')  
  ['apples', 'pears', 'oranges']
  """
  return lambda x: x.split(delim)