MCPcopy
hub / github.com/Effect-TS/effect / spanIndex

Function spanIndex

packages/effect/src/Array.ts:870–879  ·  view source on GitHub ↗
(self: Iterable<A>, predicate: (a: A, i: number) => boolean)

Source from the content-addressed store, hash-verified

868})
869
870const 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:

Callers 1

Array.tsFile · 0.85

Calls 1

predicateFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…