Macaulay2 » Documentation
Packages » Macaulay2Doc :: rotate(ZZ,VisibleList)
next | previous | forward | backward | up | index | toc

rotate(ZZ,VisibleList) -- rotate a list

Synopsis

Description

i1 : p = 0 .. 20

o1 = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
     ------------------------------------------------------------------------
     20)

o1 : Sequence
i2 : rotate(3,p)

o2 = (3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1,
     ------------------------------------------------------------------------
     2)

o2 : Sequence
i3 : rotate(-3,p)

o3 = (18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
     ------------------------------------------------------------------------
     17)

o3 : Sequence

Ways to use this method: