# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/importers.util.ipynb (unless otherwise specified).

__all__ = ['batch']

# Cell

def batch(iterable, n=1):
    l = len(iterable)
    for ndx in range(0, l, n):
        yield iterable[ndx:min(ndx + n, l)]