'Apply a function to each component of a vector.'

def applyfunc(self, f):

    if (not callable(f)):
        raise TypeError('`f`    must    be    callable.')
    d = {}
    for v in self.args:
        d[v[1]] = v[0].applyfunc(f)
    return Vector(d)
