Handbook
Glossary
<safe-slice> ( from to seq -- slice/f )
Vocabulary
sequences
.
parser
Inputs
from
an
integer
to
an
integer
seq
a
sequence
Outputs
slice/f
a
slice
or
f
Definition
USING:
combinators.short-circuit
kernel
math
sequences
sequences.private
;
IN:
sequences.parser
:
<safe-slice>
( from to seq -- slice/f )
3dup
{
[
2drop
0
<
]
[
nipd
length
>
]
[
drop
>
]
}
3||
[
3drop
f
]
[
<slice-unsafe>
]
if
;
inline