getInitializableSyncEither
import { getInitializableSyncEither } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/sync_either.ts";Create an Initializable instance for SyncEither given Initializable instances for the Left and Right types.
@example
import { getInitializableSyncEither, right } from "./sync_either.ts";
import * as N from "./number.ts";
import * as S from "./string.ts";
const initializable = getInitializableSyncEither(N.InitializableNumberSum, S.InitializableString);
const se1 = right(2);
const se2 = right(3);
const result = initializable.combine(se2)(se1)(); // Right(5)
const init = initializable.init()(); // Right(0)
function getInitializableSyncEither<A, B>(IA: Initializable<A>, IB: Initializable<B>): Initializable<SyncEither<B, A>>;
§
getInitializableSyncEither<A, B>(IA: Initializable<A>, IB: Initializable<B>): Initializable<SyncEither<B, A>>
[src]§Return Type
§
Initializable<SyncEither<B, A>>
[src]