Either
import type { Either } from "https://raw.githubusercontent.com/baetheus/fun/main/either.ts";
The Either type is a discriminated union of Left and Right, representing two exclusive possibilities. Either<L, R> can be either Left or Right.
@example
import * as E from "./either.ts";
type Result = E.Either<string, number>;
const success: Result = E.right(42);
const failure: Result = E.left("Invalid input");