Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
sorted-member? ( obj seq -- ? )
Factor documentation
>
Factor handbook
>
The language
>
Collections
>
Sequence operations
>
Binary search
Prev:
sorted-index ( obj seq -- i )
Next:
sorted-member-eq? ( obj seq -- ? )
Vocabulary
binary-search
Inputs and outputs
obj
an
object
seq
a sorted sequence
?
a boolean
Word description
Tests if the sorted sequence contains
elt
. Equality is tested with
=
.
See also
member?
Definition
USING:
kernel
;
IN:
binary-search
:
sorted-member?
( obj seq -- ? )
dupd
natural-search
nip
=
;