(chunkSize: number)
| 219 | it.effect("collectAllWhileWith - example 1", () => |
| 220 | Effect.gen(function*() { |
| 221 | const program = (chunkSize: number) => |
| 222 | pipe( |
| 223 | Stream.fromChunk(Chunk.range(1, 10)), |
| 224 | Stream.rechunk(chunkSize), |
| 225 | Stream.run(pipe( |
| 226 | Sink.sum, |
| 227 | Sink.collectAllWhileWith({ |
| 228 | initial: -1, |
| 229 | while: (n) => n === n, |
| 230 | body: (acc, curr) => acc + curr |
| 231 | }) |
| 232 | )) |
| 233 | ) |
| 234 | const result1 = yield* (program(1)) |
| 235 | const result2 = yield* (program(3)) |
| 236 | const result3 = yield* (program(20)) |
no test coverage detected