(s: S, f: (s: S) => Option.Option<readonly [A, S]>)
| 7400 | |
| 7401 | /** @internal */ |
| 7402 | export const unfold = <S, A>(s: S, f: (s: S) => Option.Option<readonly [A, S]>): Stream.Stream<A> => |
| 7403 | unfoldChunk(s, (s) => pipe(f(s), Option.map(([a, s]) => [Chunk.of(a), s]))) |
| 7404 | |
| 7405 | /** @internal */ |
| 7406 | export const unfoldChunk = <S, A>( |