• Returns fn(v) if res is an Ok(v), otherwise the error res. The order of arguments is reversed because of that it is useful for partial applying.

    Type Parameters

    • T

    • U

    • F

    Parameters

    • fn: ((value) => Promise<Result<F, U>>)

      The function which provides a second result.

        • (value): Promise<Result<F, U>>
        • Parameters

          • value: T

          Returns Promise<Result<F, U>>

    Returns (<E>(res) => Promise<Result<F | E, U>>)

      • <E>(res): Promise<Result<F | E, U>>
      • Type Parameters

        • E

        Parameters

        Returns Promise<Result<F | E, U>>

Generated using TypeDoc