auto arr = [0, 1, 2, 3].repeatStream, flt1 = arr.firFilter([0, 1]); assert(flt1.read(new int[8]) == [0, 0, 0*1+1*0, 1, 2, 3, 0, 1]); auto flt2 = arr.firFilter([1, 2]); assert(flt2.read(new int[6]) == [0, 0, 0*2+1*1, 1*2+2*1, 2*2+3*1, 3*2+0*1]);
See Implementation