Posted to tcl by dandyn at Fri Sep 02 18:48:16 GMT 2022view raw

  1. set x {cat horse dog}
  2. proc lrot _l {
  3. upvar 1 $_l l
  4. set res [lindex $l 0]
  5. set l [concat [lrange $l 1 end] $res]
  6. return $res
  7. }
  8.  
  9. puts [lrot x]