Function
spanIndex
(self: Iterable<A>, predicate: (a: A, i: number) => boolean)
Source from the content-addressed store, hash-verified
| 1419 | } |
| 1420 | i++ |
| 1421 | } |
| 1422 | return i |
| 1423 | } |
| 1424 | |
| 1425 | /** |
| 1426 | * Splits an iterable into two arrays: the longest prefix where the predicate |
| 1427 | * holds, and the remaining elements. |
| 1428 | * |
| 1429 | * **When to use** |
| 1430 | * |
| 1431 | * Use when you need both the longest predicate-matching prefix and the |
| 1432 | * remaining elements. |
| 1433 | * |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…