ListVariable | List to derive from. Can be either a value or @VarName (will upvar and read/write). |
SublistLength | How many elements each sublist should be. |
Note that arguments of the form XxxVariable can take either a normal value or the name of a variable to read/write, prefixed by @. See About Using @ for details.
This shows how to take a list and group it by 2s.
% set MyList [list id-1 name-1 id-2 name-2 id-3 name-3]
id-1 name-1 id-2 name-2 id-3 name-3
% Raise $MyList 2
{id-1 name-1} {id-2 name-2} {id-3 name-3}
% set MyList [list id-1 name-1 id-2 name-2 id-3 name-3]
id-1 name-1 id-2 name-2 id-3 name-3
% Raise @MyList 2
{id-1 name-1} {id-2 name-2} {id-3 name-3}
% puts $MyList
{id-1 name-1} {id-2 name-2} {id-3 name-3}