* This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array|Object} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holder
(args, partials, holders)
| 4513 | * @returns {Array} Returns the new array of composed arguments. |
| 4514 | */ |
| 4515 | function composeArgsRight(args, partials, holders) { |
| 4516 | var holdersIndex = -1, |
| 4517 | holdersLength = holders.length, |
| 4518 | argsIndex = -1, |
| 4519 | argsLength = nativeMax(args.length - holdersLength, 0), |
| 4520 | rightIndex = -1, |
| 4521 | rightLength = partials.length, |
| 4522 | result = Array(argsLength + rightLength); |
| 4523 | |
| 4524 | while (++argsIndex < argsLength) { |
| 4525 | result[argsIndex] = args[argsIndex]; |
| 4526 | } |
| 4527 | var pad = argsIndex; |
| 4528 | while (++rightIndex < rightLength) { |
| 4529 | result[pad + rightIndex] = partials[rightIndex]; |
| 4530 | } |
| 4531 | while (++holdersIndex < holdersLength) { |
| 4532 | result[pad + holders[holdersIndex]] = args[argsIndex++]; |
| 4533 | } |
| 4534 | return result; |
| 4535 | } |
| 4536 | |
| 4537 | /** |
| 4538 | * Creates a function that aggregates a collection, creating an accumulator |