예제 #1
0
파일: reducing.py 프로젝트: lcrees/twoq
 def zip(self):
     '''
     smash incoming things into one single thing, pairing things by iterable
     position
     '''
     with self._context():
         return self._xtend(zip(*self._iterable))
예제 #2
0
파일: reducing.py 프로젝트: lcrees/twoq
 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))