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

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


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


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

// src/Traced.ts
var Traced_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Traced_exports, {
  Functor: () => Functor,
  URI: () => URI,
  censor: () => censor,
  flap: () => flap2,
  getComonad: () => getComonad,
  listen: () => listen,
  listens: () => listens,
  map: () => map,
  traced: () => traced,
  tracks: () => tracks
});
function tracks(M, f) {
  return (wa) => wa(f(wa(M.empty)));
}
function listen(wa) {
  return (e) => [wa(e), e];
}
function listens(f) {
  return (wa) => (e) => [wa(e), f(e)];
}
function censor(f) {
  return (wa) => (e) => wa(f(e));
}
function getComonad(monoid) {
  function extend(wa, f) {
    return (p1) => f((p2) => wa(monoid.concat(p1, p2)));
  }
  function extract(wa) {
    return wa(monoid.empty);
  }
  return {
    URI,
    _E: void 0,
    map: _map,
    extend,
    extract
  };
}
var _map = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, map(f));
var map = (f) => (fa) => (p) => f(fa(p));
var URI = "Traced";
var Functor = {
  URI,
  map: _map
};
var flap2 = /* @__PURE__ */ _chunk7K74W2G3js.flap.call(void 0, Functor);
var traced = Functor;













exports.tracks = tracks; exports.listen = listen; exports.listens = listens; exports.censor = censor; exports.getComonad = getComonad; exports.map = map; exports.URI = URI; exports.Functor = Functor; exports.flap = flap2; exports.traced = traced; exports.Traced_exports = Traced_exports;
