import {
  flap
} from "./chunk-WKK6AYQI.mjs";
import {
  pipe
} from "./chunk-ZI34HWXZ.mjs";
import {
  __export
} from "./chunk-QK4PKNB3.mjs";

// src/Separated.ts
var Separated_exports = {};
__export(Separated_exports, {
  Bifunctor: () => Bifunctor,
  Functor: () => Functor,
  URI: () => URI,
  bimap: () => bimap,
  flap: () => flap2,
  left: () => left,
  map: () => map,
  mapLeft: () => mapLeft,
  right: () => right,
  separated: () => separated
});
var separated = (left2, right2) => ({ left: left2, right: right2 });
var _map = (fa, f) => pipe(fa, map(f));
var _mapLeft = (fa, f) => pipe(fa, mapLeft(f));
var _bimap = (fa, g, f) => pipe(fa, bimap(g, f));
var map = (f) => (fa) => separated(left(fa), f(right(fa)));
var mapLeft = (f) => (fa) => separated(f(left(fa)), right(fa));
var bimap = (f, g) => (fa) => separated(f(left(fa)), g(right(fa)));
var URI = "Separated";
var Bifunctor = {
  URI,
  mapLeft: _mapLeft,
  bimap: _bimap
};
var Functor = {
  URI,
  map: _map
};
var flap2 = /* @__PURE__ */ flap(Functor);
var left = (s) => s.left;
var right = (s) => s.right;

export {
  separated,
  map,
  mapLeft,
  bimap,
  URI,
  Bifunctor,
  Functor,
  flap2 as flap,
  left,
  right,
  Separated_exports
};
