lreverse(3tcl)

πŸ“¦
version 9.0.4 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… 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:


⭐ 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