lreverse(3tcl)
π lreverse β the Tcl Built-In Commands glow-up you didn't know you needed
okay bestie, sit down, because we're talking about lreverse from the Tcl Built-In Commands fam, and it's literally the simplest slay in the whole toolkit.
β¨ NAME β¨
lreverse β reverse the order of a list π¦
πΈ SYNOPSIS πΈ
lreverse list
π DESCRIPTION π
so here's the tea: lreverse hands you back a list with the exact same elements as the input list you gave it β except every element is flipped into reverse order. that's it. that's the whole job. no cap.
π EXAMPLES π
watch her work:
lreverse {a a b c}
β c b a a
lreverse {a b {c d} e f}
β f e {c d} b a
not the nested list {c d} staying perfectly intact as one element while everything around it flips β she's tidy, she's precise, she ate. π
π SEE ALSO π
the whole squad, fr fr:
list(3tcl)lappend(3tcl)lassign(3tcl)ledit(3tcl)lindex(3tcl)linsert(3tcl)llength(3tcl)lmap(3tcl)lpop(3tcl)lrange(3tcl)lremove(3tcl)lrepeat(3tcl)lreplace(3tcl)lsearch(3tcl)lseq(3tcl)lset(3tcl)lsort(3tcl)
β KEYWORDS β
element, list, reverse β iykyk π
mwah π this page is Tcl 8.5 coded, brought to you by lreverse(3tcl) herself. go reverse something, bestie π«Ά
π¦ where this page comes from
- debian trixie: tcl9.0-doc 9.0.1+dfsg-2
- ubuntu questing: tcl9.0-doc 9.0.2+dfsg-1
- ubuntu resolute: tcl9.0-doc 9.0.3+dfsg-1
- ubuntu stonking: tcl9.0-doc 9.0.4+dfsg-1
- Copyright (c) 2006 Donal K. Fellows. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms