rotate_right function
A list with its elements moved to the right, the last ones going to the front.
How to write it
rotate_right(list)
- list
- The list. Takes a list.
Examples
rotate_right([1, 2, 3])In the solver,
Open in the solverrotate_right([1, 2, 3])gives[3, 1, 2].
Related functions
- rotate_left
A list with its elements moved to the left, the first ones going to the end.
- select
The elements of a list for which a test holds.
- sort
A list in increasing order.
- riffle
A list with a value put between its elements.
- subsets
All the sublists of a list that keep its order, as a list.
- reverse
A list in reverse order.