Reverse

Reverse[expr]
reverses the order of the elements in expr.

Reverse[expr,n]
reverses elements at level n in expr.

Reverse[expr,{n1,n2,}]
reverses elements at levels , , in expr.

DetailsDetails

  • Reverse works on SparseArray objects, reversing the elements in the corresponding ordinary array.
  • Reverse[expr] is equivalent to Reverse[expr,1].
  • For a matrix m, Reverse[m] reverses the order of the rows, and Reverse[m,2] reverses the order of the columns.
Introduced in 1988
(1.0)
| Updated in 2007
(6.0)