(self: Chunk.Chunk<A>, predicate: Predicate<A>, from = 0)
| 1837 | |
| 1838 | /** @internal */ |
| 1839 | const indexWhere = <A>(self: Chunk.Chunk<A>, predicate: Predicate<A>, from = 0): number => { |
| 1840 | const iterator = self[Symbol.iterator]() |
| 1841 | let index = 0 |
| 1842 | let result = -1 |
| 1843 | let next: IteratorResult<A, any> |
| 1844 | while (result < 0 && (next = iterator.next()) && !next.done) { |
| 1845 | const a = next.value |
| 1846 | if (index >= from && predicate(a)) { |
| 1847 | result = index |
| 1848 | } |
| 1849 | index = index + 1 |
| 1850 | } |
| 1851 | return result |
| 1852 | } |
| 1853 | |
| 1854 | /** @internal */ |
| 1855 | export const succeed = <A>(a: A): Sink.Sink<A, unknown> => new SinkImpl(core.succeed(a)) |
no test coverage detected
searching dependent graphs…