'Compare the result of this function for equality.'

def __eq__(self, other):

    try:
        result = self.result()
        if isinstance(other, Function):
            return (result == other.result())
        else:
            return (result == other)
    except (TypeError, ValueError):
        return NotImplemented
