import { flatmappable } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { createBind } = flatmappable;
Create a bind function for a structure with instances of Mappable and Flatmappable. A bind function allows one to flatmap into named fields in a struct, collecting values from the result of the flatmap in the order that they are completed.
Parameters
unnamed 0: Flatmappable<U>
Returns
<N extends string, A, I, J = never, K = never, L = unknown, M = unknown>(name: Exclude<N, keyof A>, faui: (a: A) => $<U, [I, J, K], [L], [M]>) => <B = never, C = never, D extends L = L>(ua: $<U, [A, B, C], [D], [M]>) => $<U, [readonly [K in keyof A | N]: K extends keyof A ? A[K] : I, B | J, C | K], [D & L], [M]>