Function
spanIndex
(self: Iterable<A>, predicate: (a: A, i: number) => boolean)
Source from the content-addressed store, hash-verified
| 868 | }) |
| 869 | |
| 870 | const spanIndex = <A>(self: Iterable<A>, predicate: (a: A, i: number) => boolean): number => { |
| 871 | let i = 0 |
| 872 | for (const a of self) { |
| 873 | if (!predicate(a, i)) { |
| 874 | break |
| 875 | } |
| 876 | i++ |
| 877 | } |
| 878 | return i |
| 879 | } |
| 880 | |
| 881 | /** |
| 882 | * Split an `Iterable` into two parts: |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…