add doctests for pairwise(iter)