What am I missing here…
tcl>lreplace {a b c d e} 1 1 foo
a foo c d e
All works just as described in the online tclhelp.
However…
tcl>lreplace {pv1 {} 0 {} x {} {} {000000^xxxxx doctor} {} {} emm} 7 1 {000000^other doctor}
pv1 {} 0 {} x {} {} {000000^other doctor} {000000^xxxxx doctor} {} {} emm
That inserts at index 7 rather than replacing index 7, taking an 11 element list and turning it into a 12 element list. What tidbit am I missing?