Handbook
Glossary
infix-subseq-step ( subseq step -- subseq' )
Vocabulary
infix
.
private
Inputs
subseq
an
object
step
an
object
Outputs
subseq'
an
object
Definition
USING:
combinators
kernel
math
math.order
ranges
sequences
;
IN:
infix.private
:
infix-subseq-step
( subseq step -- subseq' )
{
{
0
[
"slice step cannot be zero"
throw
]
}
{
1
[
]
}
{
-1
[
reverse!
]
}
[
[
dup
length
1
[-]
0
]
dip
[
0
>
[
swap
]
when
]
keep
<range>
swap
nths
]
}
case
;