Returns a copy of the specified array/iterator in reverse order.
@|& - the array or iterator to copy and reverse.
A copy of the specified array or iterator in reverse order.
@array = @("a", "b", "c", 1, 2, 3.0); @copy = reverse(@array); println(@copy);
@(3.0, 2, 1, 'c', 'b', 'a')
sub iterator { local('$x'); for ($x = 0; $x < 4; $x++) { yield $x * 45; } } @copy = reverse(&iterator); println(@copy);
@(135, 90, 45, 0)