def zip(self): ''' smash incoming things into one single thing, pairing things by iterable position ''' with self._context(): return self._xtend(zip(*self._iterable))
def pairwise(self): '''every two incoming things as a tuple''' with self._context(): i1, i2 = tee(self._iterable) next(i2, None) return self._xtend(zip(i1, i2))