find_key
container.sorted_array.find_key
Postcondition
post
match result
i i32 => # sorted_array.this[i] = key, but we do not have 'infix =' available, so
# use less_than_or_equal instead:
#
less_than_or_equal sorted_array.this[i] key && less_than_or_equal key sorted_array.this[i]
nil => true0.095dev (GIT hash 6fe4713e6f0ffc9fa21235ced6756ebe4d5da1fe)
The guaranteed performance is in O(log n) comparisons.
result is the index where key was found or nil if key is not
in this array. In case several instance equal to key are in
this sorted_array, the index of one of the matching keys will be
returned, but is not specified which one.