Handbook
Glossary
sorted-member-eq? ( obj seq -- ? )
Factor handbook
»
The language
»
Collections
»
Sequence operations
»
Binary search
Prev:
sorted-member? ( obj seq -- ? )
Vocabulary
binary-search
Inputs
obj
an
object
seq
a sorted sequence
Outputs
?
a
boolean
Word description
Tests if the sorted sequence contains
elt
. Equality is tested with
eq?
.
See also
member-eq?
Definition
USING:
kernel
;
IN:
binary-search
:
sorted-member-eq?
( obj seq -- ? )
dupd
natural-search
nip
eq?
;