Handbook
Glossary
factorcode.org
shifted
Vocabulary
sequences.shifted
Definition
USING:
math
;
IN:
sequences.shifted
TUPLE:
shifted
{
underlying
read-only
}
{
n
integer
read-only
initial:
0
}
{
fill
read-only
}
;
Methods
USING:
accessors
sequences
sequences.shifted
;
M:
shifted
length
underlying>>
length
;
USING:
accessors
sequences
sequences.shifted
;
M:
shifted
like
underlying>>
like
;
USING:
accessors
sequences
sequences.shifted
;
M:
shifted
new-sequence
underlying>>
new-sequence
;
USING:
accessors
kernel
math
sequences
sequences.private
sequences.shifted
;
M:
shifted
nth-unsafe
[
n>>
neg
+
]
[
underlying>>
]
[
]
tri
2over
bounds-check?
[
drop
nth-unsafe
]
[
2nip
fill>>
]
if
;
USING:
accessors
kernel
math
sequences
sequences.private
sequences.shifted
;
M:
shifted
set-nth-unsafe
[
n>>
neg
+
]
[
underlying>>
]
bi
2dup
bounds-check?
[
set-nth-unsafe
]
[
3drop
]
if
;