Select columns from a collelction

column index collection
col index collection

Returns new collection composed of one or more selected columns from the input collection, columns are specified with the index argument as a single integer index or collection of integers. Type of the returned collection is the same as the type of the input collection.

Example:

"a := {{1 2 3 4} {5 6 7 8}}
print col {1 3} :a

"l := [{1 2 3 4} {5 6 7 8}]
print col 2 :l

Output:

{{1 3} {5 7}}
[2 6]

See also:

Table of Content