def filter(self): l = LazyList(range(30)) l2 = l.filter(_ % 2 == 0) l2.strict.should.have.length_of(0) l3 = LazyList(range(30)) l3[29] l4 = l3.filter(_ % 2 == 0) l4.strict.should.have.length_of(15) l4.drain.should.equal(List.wrap(range(0, 30, 2)))