NAME
Raise — Take a list and group its elements into sub-lists.
SYNOPSIS
Raise ListVariable SublistLength
DESCRIPTION
Return Value
A list where each element is a list of the given length.
Arguments
ListVariableList to derive from. Can be either a value or @VarName (will upvar and read/write).
SublistLengthHow many elements each sublist should be.
More Info
Useful for taking the flat, raw list one gets back from an sqlite eval and grouping the elements into records.

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.


For information regarding exceptions / errors, see here.
EXAMPLES

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}
KEYWORDS
conversion, list