'Evaluate this piecewise function.'

def doit(self, **hints):

    newargs = []
    for (e, c) in self.args:
        if hints.get('deep', True):
            if isinstance(e, Basic):
                e = e.doit(**hints)
            if isinstance(c, Basic):
                c = c.doit(**hints)
        newargs.append((e, c))
    return self.func(*newargs)
