Artifact 2ebdfe8d8a12f1881a11f40aaa759e625f8245b617f16421fd8bd46e29240a66:
- File doc/markdown/Tcl/lremove.md — part of check-in [b84ce0eee1] at 2026-10-04 22:10:02 on branch tip-700 — file location re-organisation (part 1) (user: Torsten, size: 1446) [annotate] [blame] [check-ins using]
- File doc/markdown/lremove.md — part of check-in [5e80e55e41] at 2026-09-26 22:40:07 on branch tip-700 — - added a "title" metadata element to the generated yaml block to satisfy Pandoc when converting to HTML - added markdown2html.tcl as prototype/placeholder of conversion script markdown -> HTML - added some CSS to play with a good visual representation of the generated HTML, starting with the n section pages - fixed man2markdown.tcl not giving the two .TP/.IP parsing places the same treatment (user: Torsten, size: 1446) [annotate] [blame] [check-ins using]
CommandName: lremove title: lremove ManualSection: n Version: 9.0 TclPart: Tcl TclDescription: Tcl Built-In Commands Links:
- list(n)
- lappend(n)
- lassign(n)
- ledit(n)
- lindex(n)
- linsert(n)
- llength(n)
- lmap(n)
- lpop(n)
- lrange(n)
- lrepeat(n)
- lreplace(n)
- lreverse(n)
- lsearch(n)
- lseq(n)
- lset(n)
- lsort(n) Keywords:
- element
- list
- remove Copyright:
- Copyright (c) 2019 Donal K. Fellows. ---
Name
lremove - Remove elements from a list by index
Synopsis
::: {.synopsis} ::: [lremove]{.cmd} [list]{.arg} [index]{.optdot} :::
Description
lremove returns a new list formed by simultaneously removing zero or more elements of list at each of the indices given by an arbitrary number of index arguments. The indices may be in any order and may be repeated; the element at index will only be removed once. The index values are interpreted the same as index values for the command string index, supporting simple index arithmetic and indices relative to the end of the list. 0 refers to the first element of the list, and end refers to the last element of the list.
Examples
Removing the third element of a list:
% lremove {a b c d e} 2
a b d e
Removing two elements from a list:
% lremove {a b c d e} end-1 1
a c e
Removing the same element indicated in two different ways:
% lremove {a b c d e} 2 end-2
a b d e