Posted to tcl by apn at Tue Nov 17 07:57:08 GMT 2015view raw

  1. There seems to be an inconsistency between compiled and interpreted lreplace
  2.  
  3. % proc lr {l val pos} {lreplace $l $pos $pos $val}
  4. % set l {a b c}
  5. a b c
  6. % lr $l x 3
  7. list doesn't contain element 3
  8. % lreplace $l 3 3 x
  9. a b c x
  10.