Make life easier
# from fastcore.all import typedispatch
# import itertools
# from collections.abc import Iterable
# from nbdev.showdoc import *
# @typedispatch
# def chunks(iterable:list, n:int=1) -> Iterable:
# for ix in range(0, len(iterable), n):
# yield iterable[ix: min(ix+n, len(iterable))]
# @typedispatch
# def chunks(iterable:Iterable, n:int=1) -> Iterable:
# it = iter(iterable)
# while True:
# chunk_it = itertools.islice(it, n)
# try:
# first_el = next(chunk_it)
# except StopIteration:
# return
# yield itertools.chain((first_el,), chunk_it)
# show_doc(chunks)
# from fastcore.all import typedispatch
# from collections.abc import Iterable