UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

12 lines (11 loc) 333 B
"use strict"; // Applies the given function with the given array of arguments Object.defineProperty(exports, "__esModule", { value: true }); exports.apply = void 0; function apply(fn, args) { if (arguments.length === 1) { return (_args) => apply(fn, _args); } return fn(...(args || [])); } exports.apply = apply;