rotate the elements in a list - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Tables, lists, and sets : ListTools Package : ListTools/Rotate

ListTools[Rotate] - rotate the elements in a list

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)

withListTools:

RotateL,1

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

(2)

RotateL,3

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

(3)

RotateL,3

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

(4)

RotateL,12

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

(5)

See Also

list, ListTools, type[list]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam