Handbook
Glossary
out-of-zbox ( seq Z l r k -- seq Z l r )
Vocabulary
z-algorithm
.
private
Inputs
seq
an
object
Z
an
object
l
an
object
r
an
object
k
an
object
Outputs
seq
an
object
Z
an
object
l
an
object
r
an
object
Definition
USING:
kernel
math
sequences
z-algorithm
;
IN:
z-algorithm.private
::
out-of-zbox
( seq Z l r k -- seq Z l r )
seq k
tail-slice
seq
lcp
:>
Zk Zk k Z
set-nth
seq Z Zk 0
>
[
k Zk k
+
1
-
]
[
l r
]
if
;
inline