Vocabularybinary-searchInputs and outputs| obj | an object |
| seq | a sorted sequence |
| i | an index, or f |
Word descriptionOutputs the index of the element closest to
elt in the sequence. See
search for details.
NotesIf the sequence has at least one element, this word always outputs a valid index, because it finds the closest match, not necessarily an exact one. In this respect its behavior differs from
index.
See alsoindex,
index-from,
last-index,
last-index-fromDefinition