(s: S, f: (s: S) => Option.Option<readonly [A, S]>)
| 7438 | |
| 7439 | /** @internal */ |
| 7440 | export const unfold = <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>): Stream.Stream<A> => |
| 7441 | unfoldChunk(s, (s) => pipe(f(s), Option.map(([a, s]) => [Chunk.of(a), s]))) |
| 7442 | |
| 7443 | /** @internal */ |
| 7444 | export const unfoldChunk = <S, A>( |