Handbook
Glossary
bisect-right ( 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-right
( obj seq -- i )
0 seq
length
[
2dup
<
]
[
2dup
+
2/
dup
seq
nth-unsafe
obj
after?
[
nip
]
[
swap
[
nip
1
+
]
dip
]
if
]
while
drop
;