bind
import { bind } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/iterable.ts";Bind a value from an Iterable to a name for use in subsequent computations. This is useful for chaining multiple operations that depend on previous results.
@example
import * as I from "./iterable.ts";
import { pipe } from "./fn.ts";
const computation = pipe(
I.wrap(5),
I.bindTo("x"),
I.bind("y", ({ x }) => I.wrap(x * 2)),
I.map(({ x, y }) => x + y)
);
// Iterable<number> containing [8]
const bind: Bind<KindIterable>;