text: "use strict";
  /**
   * ```ts
   * interface Separated<E, A> {
   *    readonly left: E
   *    readonly right: A
   * }
   * ```
   *
   * Represents a result of separating a whole into two parts.
   *
   * @since 2.10.0
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.right = exports.left = exports.flap = exports.Functor = exports.Bifunctor = exports.URI = exports.bimap = exports.mapLeft = exports.map = exports.separated = void 0;
  var function_1 = require("./function");
  var Functor_1 = require("./Functor");
  // -------------------------------------------------------------------------------------
  // constructors
  // -------------------------------------------------------------------------------------
  /**
   * @category constructors
   * @since 2.10.0
   */
  var separated = function (left, right) { return ({ left: left, right: right }); };
  exports.separated = separated;
  // -------------------------------------------------------------------------------------
  // non-pipeables
  // -------------------------------------------------------------------------------------
  var _map = function (fa, f) { return function_1.pipe(fa, exports.map(f)); };
  var _mapLeft = function (fa, f) { return function_1.pipe(fa, exports.mapLeft(f)); };
  var _bimap = function (fa, g, f) { return function_1.pipe(fa, exports.bimap(g, f)); };
  // -------------------------------------------------------------------------------------
  // type class members
  // -------------------------------------------------------------------------------------
  /**
   * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F<A>) => F<B>` whose argument and return types
   * use the type constructor `F` to represent some computational context.
   *
   * @category Functor
   * @since 2.10.0
   */
  var map = function (f) { return function (fa) {
      return exports.separated(exports.left(fa), f(exports.right(fa)));
  }; };
  exports.map = map;
  /**
   * Map a function over the first type argument of a bifunctor.
   *
   * @category Bifunctor
   * @since 2.10.0
   */
  var mapLeft = function (f) { return function (fa) {
      return exports.separated(f(exports.left(fa)), exports.right(fa));
  }; };
  exports.mapLeft = mapLeft;
  /**
   * Map a pair of functions over the two type arguments of the bifunctor.
   *
   * @category Bifunctor
   * @since 2.10.0
   */
  var bimap = function (f, g) { return function (fa) {
      return exports.separated(f(exports.left(fa)), g(exports.right(fa)));
  }; };
  exports.bimap = bimap;
  // -------------------------------------------------------------------------------------
  // instances
  // -------------------------------------------------------------------------------------
  /**
   * @category instances
   * @since 2.10.0
   */
  exports.URI = 'Separated';
  /**
   * @category instances
   * @since 2.10.0
   */
  exports.Bifunctor = {
      URI: exports.URI,
      mapLeft: _mapLeft,
      bimap: _bimap
  };
  /**
   * @category instances
   * @since 2.10.0
   */
  exports.Functor = {
      URI: exports.URI,
      map: _map
  };
  /**
   * Derivable from `Functor`.
   *
   * @category combinators
   * @since 2.10.0
   */
  exports.flap = 
  /*#_PURE_*/
  Functor_1.flap(exports.Functor);
  // -------------------------------------------------------------------------------------
  // utils
  // -------------------------------------------------------------------------------------
  /**
   * @since 2.10.0
   */
  var left = function (s) { return s.left; };
  exports.left = left;
  /**
   * @since 2.10.0
   */
  var right = function (s) { return s.right; };
  exports.right = right;
  