(function() {
  module("R.curry");

  var curry = require('eigensheep/curry')['default'];
  var adder = function(a, b, c, d) {
    return a + b + c + d;
  };
  var curriedAdder = curry(adder);

  test("the function can be invoked as normal", function() {
    equal(curriedAdder(1, 2, 3, 4), 10);
  });

  test("the function can be invoked in parts", function() {
    equal(curriedAdder(1)(2, 3, 4), 10);
    equal(curriedAdder(1, 2, 3)(4), 10);
  });

  test("additional arguments don't hurt", function() {
    equal(curriedAdder(1, 2, 3, 4, 5), 10);
    equal(curriedAdder(1, 2, 3)(4, 5), 10);
  });
})();

@@ -593,15 +593,542 @@
 );%0A  %7D);
+%0A%0A  test(%22an arity can be explicitly specified%22, function() %7B%0A    var unsplat = function(a, b, c) %7B%0A      return %5Ba, b, c%5D;%0A    %7D;%0A    var unsplat2 = curry(unsplat, 2);%0A%0A    deepEqual(unsplat2(1, 2), %5B1, 2, undefined%5D);%0A    deepEqual(unsplat2(1)(2), %5B1, 2, undefined%5D);%0A%0A  %7D);%0A%0A  test(%22extra arguments are still passed through when an arity is specified%22, function() %7B%0A    var unsplat = function(a, b, c) %7B%0A      return %5Ba, b, c%5D;%0A    %7D;%0A    var unsplat2 = curry(unsplat, 2);%0A%0A    deepEqual(unsplat2(1, 2, 3), %5B1, 2, 3%5D);%0A  %7D);
 %0A%7D)();%0A

Test explicitly specifying an arity in curry