# 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

- $\displaystyle \operatorname{rotate\_right}(\left[ 1, 2, 3 \right]) = \left[ 3, 1, 2 \right]$

  `rotate_right([1, 2, 3])`

  In the solver, `rotate_right([1, 2, 3])` gives `[3, 1, 2]`.

  [Open in the solver](https://hilberon.com/?q=rotate_right%28%5B1%2C%202%2C%203%5D%29)

## Related functions

- [rotate_left](https://hilberon.com/library/rotate_left)

  A list with its elements moved to the left, the first ones going to the end.
- [select](https://hilberon.com/library/select)

  The elements of a list for which a test holds.
- [sort](https://hilberon.com/library/sort)

  A list in increasing order.
- [riffle](https://hilberon.com/library/riffle)

  A list with a value put between its elements.
- [subsets](https://hilberon.com/library/subsets)

  All the sublists of a list that keep its order, as a list.
- [reverse](https://hilberon.com/library/reverse)

  A list in reverse order.

---
Source: https://hilberon.com/library/rotate_right
