flatmap
import { flatmap } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";Given a function A -> ReadonlySet and a ReadonlySet return a ReadonlySet created by applying the function to every value A and joining all the resulting ReadonlySets.
@example
import * as S from "./set.ts";
import { pipe } from "./fn.ts";
const set = S.set(1, 2, 3, 4, 5);
const result = pipe(
set,
S.flatmap(n => S.set(n, n + 1, n + 2)),
); // Set(1, 2, 3, 4, 5, 6, 7);
function flatmap<A, I>(fati: (a: A) => ReadonlySet<I>): (ua: ReadonlySet<A>) => ReadonlySet<I>;