MCPcopy Create free account
hub / github.com/effect-app/libs / spanIndex

Function spanIndex

repos/effect/packages/effect/src/Array.ts:1421–1430  ·  view source on GitHub ↗
(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 *

Callers 1

Array.tsFile · 0.85

Calls 1

predicateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…