Factor Documentation

Home

Glossary

Search
factorcode.org
shifted
Vocabulary
sequences.shifted
Definition
USING:
math
;
IN:
sequences.shifted
TUPLE:
shifted
{
underlying
readonly
}
{
n
integer
readonly
initial:
0
}
{
fill
readonly
}
;
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
newsequence
underlying>>
newsequence
;
USING:
accessors
kernel
math
sequences
sequences.private
sequences.shifted
;
M:
shifted
nthunsafe
[
n>>
neg
+
]
[
underlying>>
]
[
]
tri
2over
boundscheck?
[
drop
nthunsafe
]
[
2nip
fill>>
]
if
;
USING:
accessors
kernel
math
sequences
sequences.private
sequences.shifted
;
M:
shifted
setnthunsafe
[
n>>
neg
+
]
[
underlying>>
]
bi
2dup
boundscheck?
[
setnthunsafe
]
[
3drop
]
if
;