.. _reverse: ======= reverse ======= Reverses the order of a sequence Description ~~~~~~~~~~~ The fn:reverse function reverses the order of the items in a sequence. These items may be nodes, or atomic values, or both. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - arg:item() - Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - reverse( (1, 2, 3, 4, 5) ) - (5, 4, 3, 2, 1) * - reverse( (6, 2, 4) ) - (4, 2, 6) * - reverse( () ) - () See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_reverse-string`.