Tcl 8.7/Tk8.7a5 Documentation > Tcl Commands > lreverse

Tcl/Tk Applications | Tcl Commands | Tk Commands | Tcl C API | Tk C API

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, lappend, lassign, lindex, linsert, llength, lmap, lpop, lrange, lremove, lrepeat, lreplace, lsearch, lset, lsort

KEYWORDS

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