Why do you care what the second argument is called? Your object destructuring means that you wouldn't work with that argument at all, you'd just work with cid
and type
instead. The _arg
name and even its existence is subject to change and none of your business.
For example, if you have this:
rqOps = [
{ commit: { id: 1, type: 2 } }
{ commit: { id: 2, type: 4 } }
]
ops = rqOps.reduce (p, { commit: id: cid, type: type }, idx, arr) ->
console.log(cid, type)
p
, { }
then you'll get 1, 2
and 2, 3
in the console. If you want the whole second argument then give it a name and unpack it inside the iterator function:
ops = rqOps.reduce (p, arg, idx, arr) ->
{ commit: id: cid, type: type } = arg
#...