Handbook
Glossary
step-slice
Vocabulary
sequences
.
extras
Definition
USING:
math
;
IN:
sequences.extras
TUPLE:
step-slice
{
from
integer
read-only
initial:
0
}
{
to
integer
read-only
initial:
0
}
{
seq
read-only
}
{
step
integer
read-only
initial:
0
}
;
Methods
USING:
accessors
kernel
math
math.order
sequences
sequences.extras
;
M:
step-slice
length
[
to>>
]
[
from>>
-
]
[
step>>
]
tri
dup
0
<
[
[
neg
0
max
]
dip
neg
]
when
/mod
zero?
[
1
+
]
unless
;
inline
USING:
accessors
kernel
math
sequences
sequences.extras
;
M:
step-slice
virtual@
[
step>>
*
]
[
from>>
+
]
[
seq>>
]
tri
;
inline