Handbook
Glossary
(search-from) ( seq from boyer-moore -- i/f )
Vocabulary
boyer-moore
.
private
Inputs
seq
an
object
from
an
object
boyer-moore
an
object
Outputs
i/f
an
object
Definition
USING:
accessors
kernel
math
sequences
sequences.private
;
IN:
boyer-moore.private
::
(search-from)
( seq from boyer-moore -- i/f )
boyer-moore
pattern>>
:>
pat pat
length
:>
plen seq
length
plen
-
:>
lim from
[
dup
lim
<=
[
seq pat
pick
plen
mismatch?
[
2dup
+
seq
nth-unsafe
boyer-moore
do-shift
t
]
[
f
]
if*
]
[
drop
f
f
]
if
]
loop
;
inline