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

def applyfunc(self, f):

    if (not callable(f)):
        raise TypeError('`f`    must    be    callable.')
    out = Dyadic(0)
    for (a, b, c) in self.args:
        out += (f(a) * (b | c))
    return out
