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

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

// src/Chain.ts
var Chain_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Chain_exports, {
  bind: () => bind,
  chainFirst: () => chainFirst,
  tap: () => tap
});
function chainFirst(M) {
  const tapM = tap(M);
  return (f) => (first) => tapM(first, f);
}
function tap(M) {
  return (first, f) => M.chain(first, (a) => M.map(f(a), () => a));
}
function bind(M) {
  return (name, f) => (ma) => M.chain(ma, (a) => M.map(f(a), (b) => Object.assign({}, a, { [name]: b })));
}






exports.chainFirst = chainFirst; exports.tap = tap; exports.bind = bind; exports.Chain_exports = Chain_exports;
