partitionMap
import { partitionMap } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/set.ts";Given a function A -> Either<J, I> and a ReadonlySet return a Pair(ReadonlySet, ReadonlySet) by applying every value A in the set to the partitioning function.
@example
import * as S from "./set.ts";
import * as E from "./either.ts";
import { pipe } from "./fn.ts";
const set = S.set("one", "two", "three", "four");
const result = pipe(
set,
S.partitionMap(s => s.includes('o') ? E.right(s) : E.left(s.length)),
); // [Set("one", "two", "four"), Set(5)]