def mapdictk(f, d):
  """
  Maps a function over the keys of a dictionary.

  .. note:: \
  If `f` maps different keys `k_1, ... k_n` into the same \
  key `k`, the dictionary will contain only one of them. 
  
  Examples
  --------
  
  Let us define a simple dictionary:  
  
  >>> d = {1: 'a'}
  
  >>> mapdictk(lambda x: x + 1, d)
  {2: 'a'}
  
  """
  return dict(map(lambda key: (f(key), d[key]), d.keys()))