DOKK / manpages / debian 12 / tcl8.6-doc / lreverse.3tcl.en
lreverse(3tcl) Tcl Built-In Commands lreverse(3tcl)


lreverse - Reverse the order of a list

lreverse list


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

lreverse {a a b c}

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

list(3tcl), lsearch(3tcl), lsort(3tcl)

element, list, reverse

8.5 Tcl