Function
arrayMap3
(
a1: T1[],
a2: T2[],
a3: T3[],
fn: (d1: T1, d2: T2, d3: T3, i: number) => TR
)
Source from the content-addressed store, hash-verified
| 30 | } |
| 31 | |
| 32 | export function arrayMap3<T1, T2, T3, TR>( |
| 33 | a1: T1[], |
| 34 | a2: T2[], |
| 35 | a3: T3[], |
| 36 | fn: (d1: T1, d2: T2, d3: T3, i: number) => TR |
| 37 | ): TR[] { |
| 38 | const _a1_ = a1.length; |
| 39 | |
| 40 | const res: TR[] = new Array<TR>(_a1_); |
| 41 | |
| 42 | for (let i = 0; i < _a1_; ++i) { |
| 43 | res[i] = fn(a1[i], a2[i], a3[i], i); |
| 44 | } |
| 45 | |
| 46 | return res; |
| 47 | } |
| 48 | |
| 49 | export function arrayMapN<TR>( |
| 50 | fn: (i: number, ...args: any[]) => TR, |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…