Again, to maintain the dynamics of a list, it may be necessary to reverse the elements. To accomplish this, Tcl provides the lreverse
command. The syntax is as follows:
lreverse list
In the following example, we will use the lreverse
command to reverse the elements in our list. Return values from the commands are provided for clarity. Enter the following command:
% lreverse {a b c d e}
e d c b a
3.133.157.142