@function test-ary-1($a, $b: 0, $c: 0) {
    @return $a + $b + $c;
}
@function test-ary-2($a) {
    @return $a * 3;
}
@include test-module('_ary') {
    @include test('should cap the number of params provided to function') {
        $actual: _map('6' '8' '10', _ary(_parse-int, 1));

        @include assert-equal($actual, 6 8 10);
    }

    @include test('should default to n = 1') {
        $actual: _map('6' '8' '10', _ary(_parse-int));

        @include assert-equal($actual, 6 8 10);
    }

    @include test('should work when provided less than the capped number of arguments') {
        $capped: _ary(test-ary-1, 3);

        @include assert-equal(_exec($capped, 7), 7);
    }

    @include test('should work as an iteratee for _map') {
        $funcs: _map(test-ary-1 test-ary-2, _ary);

        @include assert-equal(_exec(nth($funcs, 1), 7), 7);
        @include assert-equal(_exec(nth($funcs, 2), 7), 21);
    }
}