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

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


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

// src/Functor.ts
var Functor_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Functor_exports, {
  as: () => as,
  asUnit: () => asUnit,
  bindTo: () => bindTo,
  flap: () => flap,
  getFunctorComposition: () => getFunctorComposition,
  let: () => let_,
  map: () => map
});
function map(F, G) {
  return (f) => (fa) => F.map(fa, (ga) => G.map(ga, f));
}
function flap(F) {
  return (a) => (fab) => F.map(fab, (f) => f(a));
}
function bindTo(F) {
  return (name) => (fa) => F.map(fa, (a) => ({ [name]: a }));
}
function let_(F) {
  return (name, f) => (fa) => F.map(fa, (a) => Object.assign({}, a, { [name]: f(a) }));
}
function getFunctorComposition(F, G) {
  const _map = map(F, G);
  return {
    map: (fga, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fga, _map(f))
  };
}
function as(F) {
  return (self, b) => F.map(self, () => b);
}
function asUnit(F) {
  const asM = as(F);
  return (self) => asM(self, void 0);
}










exports.map = map; exports.flap = flap; exports.bindTo = bindTo; exports.let_ = let_; exports.getFunctorComposition = getFunctorComposition; exports.as = as; exports.asUnit = asUnit; exports.Functor_exports = Functor_exports;
