Tcl8.6b2/Tk8.6b2 Documentation > TclCmd > lreverse

Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands, version 4.0b7 | TDBC Package Commands, version 1.0b17 | Thread Package Commands, version 2.6.7 | Tcl Library | Tk Library | [incr Tcl] Package Library, version 4.0b7 | TDBC Package Library, version 1.0b17

NAME

lreverse — Reverse the order of a list

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

SEE ALSO

list, lsearch, lsort

KEYWORDS

element, list, reverse
Copyright © 2006 by Donal K. Fellows. All rights reserved.