Name
lset
— Set list elements.
Synopsis
lset
listref
index
[replacement]
Description
The lset command sets the
index'th element
of the list to
replacement. If
replacement is
not present, then the element is deleted.
Example
set lst {a b c}
lset $lst 1 x
puts $lst
lset $lst 1
puts $lst
Produces:
a x c
a c