tcldoc Tcl/Tk 9.0.4
/

HomeTcl Built-In Commands Tcl

lreverse

Reverse the order of a list

literal type exactly as shown argument replace with your value ?optional? may be omitted

Synopsis#

lreverse list

Description#

The lreverse command returns a list that has the same elements as its input list, list, except with the elements in the reverse order.

Examples#

lreverse {a a b c}
      → c b a a
lreverse {a b {c d} e f}
      → f e {c d} b a

Keywords#

element · list · reverse

Copyright#