HEX
Server: nginx/1.24.0
System: Linux nowruzgan 6.8.0-57-generic #59-Ubuntu SMP PREEMPT_DYNAMIC Sat Mar 15 17:40:59 UTC 2025 x86_64
User: babak (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //usr/share/opensearch-dashboards/node_modules/fp-ts/es6/Monoidal.js
import { constant } from './function';
export function fromApplicative(F) {
    var f = function (a) { return function (b) { return [a, b]; }; };
    return {
        URI: F.URI,
        map: F.map,
        unit: function () { return F.of(undefined); },
        mult: function (fa, fb) { return F.ap(F.map(fa, f), fb); }
    };
}
export function toApplicative(M) {
    return {
        URI: M.URI,
        map: M.map,
        of: function (a) { return M.map(M.unit(), constant(a)); },
        ap: function (fab, fa) { return M.map(M.mult(fab, fa), function (_a) {
            var f = _a[0], a = _a[1];
            return f(a);
        }); }
    };
}