let array_find (_predicate: '-> bool) (_array: 'a array) : 'a =

  let rec do_array_exists (index: int) : 'a =
    if index >= Array.length _array then
      raise Not_found
    else if _predicate _array.(index) then
      _array.(index)
    else
      do_array_exists (index + 1)
  in

    do_array_exists 0