// ets_tracing: off
import type * as Chunk from "../core.js"
import { indexWhereFrom_ } from "./indexWhereFrom.js"
/**
* Returns the first index for which the given predicate is satisfied.
*/
export function indexWhere_(self: Chunk.Chunk, f: (a: A) => boolean): number {
return indexWhereFrom_(self, 0, f)
}
/**
* Returns the first index for which the given predicate is satisfied.
*
* @ets_data_first indexWhere_
*/
export function indexWhere(f: (a: A) => boolean): (self: Chunk.Chunk) => number {
return (self) => indexWhere_(self, f)
}