Evaluated proc setval {list name val} { if { [set i [lsearch $list $name]] >= 0 } { lreplace $list [+ 1 $i] [+ 1 $i] $val } { . $list $name [list $val] } }