Handbook
Glossary
bisect-left ( obj seq -- i )
Vocabulary
sorting
.
extras
Inputs
obj
an
object
seq
an
object
Outputs
i
an
object
Definition
USING:
kernel
math
math.order
sequences
sequences.private
;
IN:
sorting.extras
::
bisect-left
( obj seq -- i )
0 seq
length
[
2dup
<
]
[
2dup
+
2/
dup
seq
nth-unsafe
obj
before?
[
swap
[
nip
1
+
]
dip
]
[
nip
]
if
]
while
drop
;