set x {cat horse dog} proc lrot _l { upvar 1 $_l l set res [lindex $l 0] set l [concat [lrange $l 1 end] $res] return $res } puts [lrot x]
Comments
Posted by dandyn at Fri Sep 02 18:45:52 GMT 2022 [text] [code]
set x {cat horse dog} proc lrot _l { upvar 1 $_l l set res [lindex $l 0] set l [concat [lrange $l 1 end] $res] return $res } puts [lrot x]