Changing `Array.prototype` isn’t worth the effort. Write your own reduce 
function that does exactly what you want:

```js
function foldr (list, func, acc) {
  for (let i = list.length; --i >= 0;) acc = func(acc, list[i], i)
  return acc
}
```

This will default the initial value to `undefined` and let you omit it.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to