getInitializableAsyncEither
import { getInitializableAsyncEither } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/async_either.ts";Create an Initializable instance for AsyncEither given Initializable instances for the Left and Right types.
@example
import * as AE from "./async_either.ts";
import * as N from "./number.ts";
import * as S from "./string.ts";
const initializable = AE.getInitializableAsyncEither(N.InitializableNumberSum, S.InitializableString);
const ae1 = AE.right(2);
const ae2 = AE.right(3);
const result = await initializable.combine(ae2)(ae1)(); // Right(5)
const init = await initializable.init()(); // Right(0)
function getInitializableAsyncEither<A, B>(CA: Initializable<A>, CB: Initializable<B>): Initializable<AsyncEither<B, A>>;
§
getInitializableAsyncEither<A, B>(CA: Initializable<A>, CB: Initializable<B>): Initializable<AsyncEither<B, A>>
[src]