applySequential
import { applySequential } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_either.ts";Apply a function wrapped in an AsyncEither to a value wrapped in an AsyncEither, sequentially.
@example
import * as AE from "./async_either.ts";
import { pipe } from "./fn.ts";
const asyncEitherFn = AE.right((n: number) => n * 2);
const asyncEitherValue = AE.right(5);
const result = pipe(
asyncEitherFn,
AE.applySequential(asyncEitherValue)
);
const value = await result(); // Right(10)
function applySequential<A, B>(ua: AsyncEither<B, A>): <I, J = never>(ufai: AsyncEither<J, (a: A) => I>) => AsyncEither<B | J, I>;
§
applySequential<A, B>(ua: AsyncEither<B, A>): <I, J = never>(ufai: AsyncEither<J, (a: A) => I>) => AsyncEither<B | J, I>
[src]§Parameters
§
ua: AsyncEither<B, A>
[src]§Return Type
§
<I, J = never>(ufai: AsyncEither<J, (a: A) => I>) => AsyncEither<B | J, I>
[src]