Rotate - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


ListTools

  

Rotate

  

rotate the elements in a list

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Rotate(L, N)

Parameters

L

-

list

N

-

integer

Description

• 

The Rotate(L, N) function rotates the elements in list L by N positions.

• 

In the special case where L contains no elements,  is returned.

Examples

> 

L≔1,2,3,4,5,6,7,8,9,10

L≔1,2,3,4,5,6,7,8,9,10

(1)
> 

with⁡ListTools:

> 

Rotate⁡L,1

2,3,4,5,6,7,8,9,10,1

(2)
> 

Rotate⁡L,3

4,5,6,7,8,9,10,1,2,3

(3)
> 

Rotate⁡L,−3

8,9,10,1,2,3,4,5,6,7

(4)
> 

Rotate⁡L,−12

9,10,1,2,3,4,5,6,7,8

(5)

See Also

list

ListTools

type[list]