Takes a function with args and returns a curried version of it
@param   {Function}  fn  A function to curry
@returns {Function}      A curried version of the original function
function curry(fn) {
  return function resolver() {
    for (var _len = arguments.length, resolverArgs = Array(_len), _key = 0; _key < _len; _key++) {
      resolverArgs[_key] = arguments[_key];
    }

    return function () {
      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }

      var nextArgs = resolverArgs.concat(args.length ? args : null);
      var next = nextArgs.length >= fn.length ? fn : resolver;
      return next.apply(undefined, toConsumableArray(nextArgs));
    };
  }();
}