metasync icon indicating copy to clipboard operation
metasync copied to clipboard

Make metasync.reduce compatible with Array.reduce

Open tshemsedinov opened this issue 6 years ago • 0 comments

Compare

Array.prototype.reduce((previous, current, index, array) => (result) [, initial]) : Array

and current implementation:

metasync.reduce(
  array,
  (previous, current, callback, index, array) => callback(result)
  [, initial]
);

we may change to:

metasync.reduce(
  array,
  (previous, current, [index, [array],] callback) => callback(result)
  [, initial]
);

tshemsedinov avatar Apr 06 '18 18:04 tshemsedinov