Applies a mathematic function to the interval arithmetic template:
        generate all combinations of low/high values and then take the widest
        bounds (min/max) for the result.

def map(self, other, function):
        """
        Applies a mathematic function to the interval arithmetic template:
        generate all combinations of low/high values and then take the widest
        bounds (min/max) for the result.
        """
        other = IntervalCell.coerce(other)
        # check the arity of the function
        import inspect
        arity = len(inspect.getargspec(function).args)

        if arity == 2:
            combos = [function(self.low, other.low),
                      function(self.low, other.high),
                      function(self.high, other.low),
                      function(self.high, other.high)]
            return IntervalCell(min(combos), max(combos))
        else:
            raise Exception("Cannot apply function of arity %i " % (arity))