Handbook
Glossary
all-rotations ( seq -- seq' )
Vocabulary
sequences
.
extras
Inputs
seq
a
sequence
Outputs
seq'
a
sequence
Word description
Pushes a sequence containing all the rotations of
seq
, including the original array.
Definition
USING:
kernel
sequences
;
IN:
sequences.extras
:
all-rotations
( seq -- seq' )
dup
length
<iota>
[
rotate
]
with
map
;