def _xhaust(mapfunc, call, iterable, exception=StopIteration, n=next):
    """Call function `call` on an `iterable` until it's exhausted."""
    iterable = mapfunc(call, iterable)
    try:
        while 1:
            n(iterable)
    except exception:
        pass
