Documentation for method List.reverse

From List

reverse

multi sub    reverse(*@list ) returns List:D
multi method reverse(List:D:) returns List:D

Returns a list with the same elements in reverse order.

Note that reverse always refers to reversing elements of a list; to reverse the characters in a string, use flip.

Examples:

say <hello world!>.reverse      #  world! hello
say reverse ^10                 # 9 8 7 6 5 4 3 2 1 0