"use strict";Object.defineProperty(exports, "__esModule", {value: true});

var _chunkGWX33PUIjs = require('./chunk-GWX33PUI.js');


var _chunk7K74W2G3js = require('./chunk-7K74W2G3.js');


var _chunkSQA7G4TEjs = require('./chunk-SQA7G4TE.js');


var _chunk6C3VEZWHjs = require('./chunk-6C3VEZWH.js');

// src/Traversable.ts
var Traversable_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Traversable_exports, {
  getTraversableComposition: () => getTraversableComposition,
  sequence: () => sequence,
  traverse: () => traverse
});
function traverse(T, G) {
  return (F) => {
    const traverseT = T.traverse(F);
    const traverseG = G.traverse(F);
    return (f) => (fga) => traverseT(fga, (ga) => traverseG(ga, f));
  };
}
function sequence(T, G) {
  return (F) => {
    const sequenceT = T.sequence(F);
    const sequenceG = G.sequence(F);
    return (fgha) => sequenceT(T.map(fgha, sequenceG));
  };
}
function getTraversableComposition(F, G) {
  const map = _chunk7K74W2G3js.getFunctorComposition.call(void 0, F, G).map;
  const FC = _chunkGWX33PUIjs.getFoldableComposition.call(void 0, F, G);
  const _traverse = traverse(F, G);
  const _sequence = sequence(F, G);
  return {
    map,
    reduce: FC.reduce,
    foldMap: FC.foldMap,
    reduceRight: FC.reduceRight,
    traverse: (H) => {
      const traverseH = _traverse(H);
      return (fga, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fga, traverseH(f));
    },
    sequence: (H) => {
      const sequenceH = _sequence(H);
      return (fgha) => _chunkSQA7G4TEjs.pipe.call(void 0, fgha, sequenceH);
    }
  };
}






exports.traverse = traverse; exports.sequence = sequence; exports.getTraversableComposition = getTraversableComposition; exports.Traversable_exports = Traversable_exports;
