Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
repeats
Vocabulary
sequences.repeating
Definition
USING:
math
sequences
;
IN:
sequences.repeating
TUPLE:
repeats
{
seq
sequence
read-only
initial:
f
}
{
length
integer
read-only
initial:
0
}
;
Methods
USING:
accessors
sequences
sequences.repeating
;
M:
repeats
length
length>>
;
USING:
accessors
kernel
math
sequences
sequences.private
sequences.repeating
;
M:
repeats
nth-unsafe
[
length>>
/
]
[
seq>>
[
length
*
>integer
]
keep
nth
]
bi
;