def pairwise(iterable):
    a, b = itertools.tee(iterable)
    next(b, None)
    return itertools.izip(a, b)
s -> (s0,s1), (s1,s2), (s2, s3), ...
dataset/ETHPy150Open aarongarrett/inspyred/docs/moonshot.py/pairwise