Skip to content

Commit 362e56f

Browse files
committed
Refactor based on updates to ndarraylike2object
1 parent 1d043dc commit 362e56f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • lib/node_modules/@stdlib/utils/map-reduce-right/lib

lib/node_modules/@stdlib/utils/map-reduce-right/lib/ndarray.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var MODE = 'throw';
4343
* @param {IntegerArray} x.strides - stride lengths
4444
* @param {NonNegativeInteger} x.offset - index offset
4545
* @param {string} x.order - specifies whether `x` is row-major (C-style) or column-major (Fortran-style)
46-
* @param {Function} x.getter - callback for accessing `x` data buffer elements
46+
* @param {Array<Function>} x.accessors - accessors for accessing data buffer elements
4747
* @param {*} initial - initial value
4848
* @param {Function} mapper - mapping function
4949
* @param {Function} reducer - reducing function
@@ -86,7 +86,7 @@ var MODE = 'throw';
8686
* 'strides': sx,
8787
* 'offset': ox,
8888
* 'order': 'row-major',
89-
* 'getter': getter
89+
* 'accessors': [ getter ]
9090
* };
9191
* x.ref = x;
9292
*
@@ -131,7 +131,7 @@ function mapReduceRight( x, initial, mapper, reducer, thisArg ) {
131131
ordx = x.order;
132132

133133
// Cache the element accessor:
134-
get = x.getter;
134+
get = x.accessors[ 0 ];
135135

136136
// Cache the reference to the original input array:
137137
ref = x.ref;

0 commit comments

Comments
 (0)