logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

lremove - Remove elements from a list by index

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 stringindex, 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

Keywords

       element, list, remove

Tcl                                                    9.0                                         lremove(3tcl)

Name

       lremove - Remove elements from a list by index

See Also

list(3tcl),  lappend(3tcl),  lassign(3tcl),  ledit(3tcl),  lindex(3tcl),  linsert(3tcl),   llength(3tcl),
       lmap(3tcl),  lpop(3tcl),  lrange(3tcl),  lrepeat(3tcl),  lreplace(3tcl),  lreverse(3tcl),  lsearch(3tcl),
       lseq(3tcl), lset(3tcl), lsort(3tcl)

Synopsis

lremovelist ?index...?
________________________________________________________________________________________________________________

See Also