import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/empty";
import * as tsplus_module_2 from "@tsplus/stdlib/data/Tuple/make";
import * as tsplus_module_3 from "@tsplus/stdlib/collections/Chunk/prepend";
import * as tsplus_module_4 from "@tsplus/stdlib/data/Either/fold";
import * as tsplus_module_5 from "@tsplus/stdlib/collections/Chunk/definition";
import * as tsplus_module_6 from "@tsplus/stdlib/collections/Chunk/reduceRight";
export function partitionMap(as, f) {
  return tsplus_module_6.reduceRight_(tsplus_module_5.from(as), tsplus_module_2.make(tsplus_module_1.empty(), tsplus_module_1.empty()), (a, {
    tuple: [es, bs]
  }) => tsplus_module_4.fold_(f(a), e => tsplus_module_2.make(tsplus_module_3.prepend_(es, e), bs), b => tsplus_module_2.make(es, tsplus_module_3.prepend_(bs, b))));
}
//# sourceMappingURL=partitionMap.mjs.map