20
20
21
21
/// <reference types="@stdlib/types"/>
22
22
23
- import { Array2D , Collection } from '@stdlib/types/array' ;
23
+ import { Collection } from '@stdlib/types/array' ;
24
24
25
25
/**
26
26
* Callback invoked for each array element.
@@ -41,7 +41,7 @@ type Unary<T, U, V> = ( this: V, value: T ) => U;
41
41
* Callback invoked for each array element.
42
42
*
43
43
* @param value - array element
44
- * @param indices - current array element indices
44
+ * @param index - current array element index
45
45
* @returns result
46
46
*/
47
47
type Binary < T , U , V > = ( this : V , value : T , index : number ) => U ;
@@ -50,17 +50,17 @@ type Binary<T, U, V> = ( this: V, value: T, index: number ) => U;
50
50
* Callback invoked for each array element.
51
51
*
52
52
* @param value - array element
53
- * @param indices - current array element indices
53
+ * @param index - current array element index
54
54
* @param array - input array
55
55
* @returns result
56
56
*/
57
- type Ternary < T , U , V > = ( this : V , value : T , index : number , array : Array2D < T > ) => U ;
57
+ type Ternary < T , U , V > = ( this : V , value : T , index : number , array : Collection < T > ) => U ;
58
58
59
59
/**
60
60
* Callback invoked for each array element.
61
61
*
62
62
* @param value - array element
63
- * @param indices - current array element indices
63
+ * @param index - current array element index
64
64
* @param array - input array
65
65
* @returns result
66
66
*/
@@ -71,12 +71,12 @@ type Callback<T, U, V> = Nullary<U, V> | Unary<T, U, V> | Binary<T, U, V> | Tern
71
71
*/
72
72
interface Routine {
73
73
/**
74
- * Applies a mask to a provided input array and returns a new array after applying a mapping function .
74
+ * Returns a new array after applying a mask and a callback function to a provided input array .
75
75
*
76
76
* @param x - input array
77
77
* @param mask - mask array
78
- * @param clbk - callback to invoke
79
- * @param thisArg - execution context
78
+ * @param clbk - callback function
79
+ * @param thisArg - callback execution context
80
80
* @returns output array
81
81
*
82
82
* @example
@@ -92,15 +92,15 @@ interface Routine {
92
92
< T = unknown , U = unknown , V = unknown > ( x : Collection < T > , mask : Collection , clbk : Callback < T , U , V > , thisArg ?: ThisParameterType < Callback < T , U , V > > ) : Array < U > ;
93
93
94
94
/**
95
- * Applies a mask and mapping function to an input array and assigns results to elements in an output array.
95
+ * Applies a mask and a callback function to an input array and assigns results to elements in an output array.
96
96
*
97
97
* @param x - input array
98
98
* @param mask - mask array
99
99
* @param out - output array
100
100
* @param stride - output array stride
101
101
* @param offset - output array offset
102
- * @param clbk - callback to invoke
103
- * @param thisArg - execution context
102
+ * @param clbk - callback function
103
+ * @param thisArg - callback execution context
104
104
* @returns output array
105
105
*
106
106
* @example
@@ -123,12 +123,12 @@ interface Routine {
123
123
}
124
124
125
125
/**
126
- * Applies a mask to a provided input array and returns a new array after applying a mapping function .
126
+ * Returns a new array after applying a mask and a callback function to a provided input array .
127
127
*
128
128
* @param x - input array
129
129
* @param mask - mask array
130
- * @param clbk - callback to invoke
131
- * @param thisArg - execution context
130
+ * @param clbk - callback function
131
+ * @param thisArg - callback execution context
132
132
* @returns output array
133
133
*
134
134
* @example
0 commit comments