aztec-nr - noir_aztec::protocol::utils::arrays

Function find_first_index

pub unconstrained fn find_first_index<T, let N: u32, Env>(
    array: [T; N],
    find: fn[Env](T) -> bool,
) -> u32

Helper function to find the index of the first element in an array that satisfies a given predicate. If the element is not found, the function returns the length of the array N