ParaFlow supports two kinds of collections - array and dir. An array is indexed by a non-negative integer. A dir is indexed by a string. Elements of arrays and dirs are accessed in similar ways: print(array[0]); // Prints the first item in array print(dir["Kent, W.J."]) // Prints item in dir filed under Kent W.J. There are two convenient ways to work on all items in a collection: foreach var v in collection statement; This will execute statement on each element of the collection. The statement may be compound (that is multiple statements surrounded by curly braces). The variable v will assume a different value each time through the loop. The iterations of the loop are executed serially. It's possible to execute a function on each item in the collection in parallel as well. The function needs to be declared with the 'para' keyword rather than the 'to' keyword, which makes the compiler check that the function does not write to global variables either directly or indirectly. The function is executed in parallel with the following construct outputCollection = para into function(inputCollection, otherParameters) As an example let's pretend we want to create an array containing the squares of the numbers 0 to 100. You could do this with a for statement: array[100] of int squares; for (int i = 0; i<100; i += 1) squares[i] = i*i; To do the same thing in parallel, first we'd define our function: para square(int x) into int y { y = x * x; } Since this function has no side effects the compiler accepts the para keyword. Next we'd need to make up an input collection. In this case the input is just the numbers from 0 to 99, so we'll put them in an array: array[100] of int input; for (int i=0; i<100; i+=1) input[i] = i; Then we'll execute our function in parallel and gather the output into a collection as so: array of int squares = para flow square(input); Collections are initialized with parenthesized comma separated lists. Here's an example of an array initialization: array of int fibonnaci = (1, 1, 2, 3, 5, 8, 13, 21) Notice that when an array is initialized it need not have an explicit dimension. Dirs are initialized using the 'to' keyword to connect the index string and the value: dir of int temperatures = ("freezing" to 32, "boiling" to 212, "body" to 98.6) It's possible to have collections of collections. A two-dimensional array is written as: array of array of int multiplicationTable = ( (0, 0, 0, 0, 0, 0), (0, 1, 2, 3, 4, 5), (0, 2, 4, 6, 8, 10), (0, 3, 6, 9, 12, 15), (0, 4, 8, 12, 16, 20), (0, 5, 10, 15, 20, 25) ) Note that not all rows are required to have the same number of elements. To use a multi-dimensional array just write the indexes one after the other. int product = multiplicationTable[2][4]; Here's how you'd might use a directory of string arrays to represent people grouped into families: dir of array of string families = ( ( "Bush", ("George", "Laura")), ( "Kent", ("Heidi", "Mira", "Tisa", "Jim")), ( "Jackson", ("Janet", "Michael", "George")) ); You could also initialize this family directory as so: array of string bushFamily = ("George", "Laura"); array of string kentFamily = ("Heidi", "Mira", "Tisa", "Jim"); array of string jacksonFamily = ("Janet", "Michael", "George"); dir of array of string families = ( ("Bush", bushFamily), ("Kent", kentFamily), ("Jackson", jacksonFamily), ); Sometimes it's useful to have an empty collection. This is written as empty parenthesis as so: array of string nothingYet = ();