fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

find_by_comparator

container.sorted_array.find_by_comparator

find index using a comparator function

The guaranteed performance is in O(log n) comparisons.

result is the index where cmp results in 0 or nil if no such index
was found in this array. In case several instance equal match,
the index of one matching key will be returned, but is not
specified which one.

NYI: CLEANUP: find better name
Postcondition
post
  match result
    i i64 => cmp sorted_array.this[i] = equal
    nil   => true
0.099dev (GIT hash a771d489a03e9fe2dd6107e0afbc9f0ac6485df3)
last changed: 2026-10-23