git.iko.soy/rowtype-yoga/yoga-r3f
on main help sign in
70 lines 2.2 kB history raw
1// Generated by purs version 0.15.16
2import * as Control_Category from "../Control.Category/index.js";
3import * as Data_Distributive from "../Data.Distributive/index.js";
4import * as Data_Function from "../Data.Function/index.js";
5import * as Data_Functor from "../Data.Functor/index.js";
6import * as Data_Lens_Types from "../Data.Lens.Types/index.js";
7import * as Data_Newtype from "../Data.Newtype/index.js";
8import * as Data_Profunctor from "../Data.Profunctor/index.js";
9import * as Data_Profunctor_Closed from "../Data.Profunctor.Closed/index.js";
10var unwrap = /* #__PURE__ */ Data_Newtype.unwrap();
11var identity = /* #__PURE__ */ Control_Category.identity(Control_Category.categoryFn);
12var zipWithOf = function (g) {
13 return function (f) {
14 return unwrap(g(f));
15 };
16};
17var zipFWithOf = function (g) {
18 return function (f) {
19 return unwrap(g(f));
20 };
21};
22var withGrate = function (g) {
23 return unwrap(g(function (f) {
24 return f(identity);
25 }));
26};
27var grate = function (f) {
28 return function (dictClosed) {
29 var dimap = Data_Profunctor.dimap(dictClosed.Profunctor0());
30 var closed = Data_Profunctor_Closed.closed(dictClosed);
31 return function (pab) {
32 return dimap(Data_Function.applyFlipped)(f)(closed(pab));
33 };
34 };
35};
36var cotraversed = function (dictDistributive) {
37 var cotraverse = Data_Distributive.cotraverse(dictDistributive)(Data_Functor.functorFn);
38 return function (dictClosed) {
39 return grate(function (f) {
40 return cotraverse(f)(identity);
41 })(dictClosed);
42 };
43};
44var collectOf = function (dictFunctor) {
45 var map = Data_Functor.map(dictFunctor);
46 return function (g) {
47 return function (f) {
48 var $14 = zipFWithOf(g)(identity);
49 var $15 = map(f);
50 return function ($16) {
51 return $14($15($16));
52 };
53 };
54 };
55};
56var cloneGrate = function (g) {
57 return function (dictClosed) {
58 return grate(withGrate(g))(dictClosed);
59 };
60};
61export {
62 grate,
63 withGrate,
64 cloneGrate,
65 cotraversed,
66 zipWithOf,
67 zipFWithOf,
68 collectOf
69};
70//# sourceMappingURL=index.js.map