import { Option } from 'fp-ts/lib/Option'; import { Unfoldable1 } from 'fp-ts/lib/Unfoldable'; import { AsyncStream, URI } from './uri'; import { MaybeAsync } from './utils/maybe-async'; /** * Takes a function which returns an {@link Option} of a tuple containing an * outcome value and an input for the following iteration. * * This function applies given `f` to the inital value `b` and then recursively * to the second element of the tuple contained in the returned {@link Option} * of the previous calculation until `f` returns `None`. * * @export * @template A The value type. * @template B The initial _seed_ value type. * @param {B} b The initial value. * @param {(b: B) => Option | Promise>} f A * function that recursively provides value-seed tuple for the output async * stream. * * @returns {AsyncStream} The output async stream. * @__PURE__ */ export declare function unfold(b: B, f: (b: B) => MaybeAsync>): AsyncStream; /** * The `Unfoldable` category instance for {@link AsyncStream}. */ export declare const Unfoldable: Unfoldable1;