sequences.rotated: adding all-rotations.

db4
John Benediktsson 2015-04-28 18:55:23 -07:00
parent a9fc7d828b
commit 16213f8779
1 changed files with 3 additions and 0 deletions

View File

@ -17,3 +17,6 @@ M: rotated virtual@ [ n>> + ] [ circular>> ] bi ;
M: rotated virtual-exemplar circular>> ; M: rotated virtual-exemplar circular>> ;
INSTANCE: rotated virtual-sequence INSTANCE: rotated virtual-sequence
: all-rotations ( seq -- seq' )
dup length iota [ <rotated> ] with map ;