bind
import { bind } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";Bind a value from an Either to a name for use in subsequent computations. This is useful for chaining multiple operations that depend on previous results.
@example
import * as E from "./either.ts";
import { pipe } from "./fn.ts";
const computation = pipe(
E.right(5),
E.bindTo("x"),
E.bind("y", ({ x }) => E.right(x * 2)),
E.map(({ x, y }) => x + y)
);
// Right(15)
const bind: Bind<KindEither>;