"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Compose functions from right to left
* Reference: https://1loc.dev/#compose-functions
* @category func
* @module compose
*/
function compose() {
var fns = [];
for (var _i = 0; _i < arguments.length; _i++) {
fns[_i] = arguments[_i];
}
return function (arg) { return fns.reduceRight(function (y, f) { return f(y); }, arg); };
}
exports.default = compose;
Source