def with_index(self): l = LazyList(itertools.count(), chunk_size=20) l2 = l.map(_ * 5).with_index l2[:2].should.equal(List((0, 0), (1, 5)))
def map(self): l = LazyList(itertools.count(), chunk_size=20) l2 = l.map(_ * 10) l2[:5].should.equal(List.wrap(range(0, 50, 10)))