reverse

Definition: sequence res = reverse(sequence src, sequence pFromTo={1,-1})
Description: Reverse the order of elements in a sequence.
Comments: A new sequence is created where the top-level elements appear in reverse order compared to the original sequence.

Optionally the start and end points can be specified, with negative values counting left from the end of the input sequence. See Technicalia for compatibility issues with OpenEuphoria.
Examples:
reverse({1,3,5,7})              -- {7,5,3,1}
reverse({{1,2,3}, {4,5,6}})     -- {{4,5,6}, {1,2,3}}
reverse({99})                   -- {99}
reverse("reverse.exw",{3,-6})   -- "resreve.exw"
reverse("reverse.exw",{3,+6})   -- ditto
-- (it is coincidental that -6 and +6 map to the same point in an 11 char string)
reverse("123.456",{-3,-1})      -- "123.654"
--reverse("123.456",5,0)        -- OpenEuphoria equivalent/compilation error
reverse({})                     -- {}
See Also: append, prepend, repeat