// Generated by purs version 0.15.16 import * as Control_Category from "../Control.Category/index.js"; import * as Data_Distributive from "../Data.Distributive/index.js"; import * as Data_Function from "../Data.Function/index.js"; import * as Data_Functor from "../Data.Functor/index.js"; import * as Data_Lens_Types from "../Data.Lens.Types/index.js"; import * as Data_Newtype from "../Data.Newtype/index.js"; import * as Data_Profunctor from "../Data.Profunctor/index.js"; import * as Data_Profunctor_Closed from "../Data.Profunctor.Closed/index.js"; var unwrap = /* #__PURE__ */ Data_Newtype.unwrap(); var identity = /* #__PURE__ */ Control_Category.identity(Control_Category.categoryFn); var zipWithOf = function (g) { return function (f) { return unwrap(g(f)); }; }; var zipFWithOf = function (g) { return function (f) { return unwrap(g(f)); }; }; var withGrate = function (g) { return unwrap(g(function (f) { return f(identity); })); }; var grate = function (f) { return function (dictClosed) { var dimap = Data_Profunctor.dimap(dictClosed.Profunctor0()); var closed = Data_Profunctor_Closed.closed(dictClosed); return function (pab) { return dimap(Data_Function.applyFlipped)(f)(closed(pab)); }; }; }; var cotraversed = function (dictDistributive) { var cotraverse = Data_Distributive.cotraverse(dictDistributive)(Data_Functor.functorFn); return function (dictClosed) { return grate(function (f) { return cotraverse(f)(identity); })(dictClosed); }; }; var collectOf = function (dictFunctor) { var map = Data_Functor.map(dictFunctor); return function (g) { return function (f) { var $14 = zipFWithOf(g)(identity); var $15 = map(f); return function ($16) { return $14($15($16)); }; }; }; }; var cloneGrate = function (g) { return function (dictClosed) { return grate(withGrate(g))(dictClosed); }; }; export { grate, withGrate, cloneGrate, cotraversed, zipWithOf, zipFWithOf, collectOf }; //# sourceMappingURL=index.js.map