git.iko.soy/rowtype-yoga/yoga-r3f
on main help sign in
23 lines 529 B history raw
1var refEq = function (r1) {
2 return function (r2) {
3 return r1 === r2;
4 };
5};
7export const eqBooleanImpl = refEq;
8export const eqIntImpl = refEq;
9export const eqNumberImpl = refEq;
10export const eqCharImpl = refEq;
11export const eqStringImpl = refEq;
13export const eqArrayImpl = function (f) {
14 return function (xs) {
15 return function (ys) {
16 if (xs.length !== ys.length) return false;
17 for (var i = 0; i < xs.length; i++) {
18 if (!f(xs[i])(ys[i])) return false;
19 }
20 return true;
21 };
22 };
23};