Vocabulary

columns

Inputs

Outputs

Word description

Outputs a new virtual sequence which presents a fixed column of a matrix represented as a sequence of rows. The i th element of a column is the n th element of the i th element of seq. Every element of seq must be a sequence, and all sequences must have equal length.

Examples

Notes

In the same sense that <reversed> is a virtual variant of reverse, <column> is a virtual variant of swap [ nth ] curry map.

Definition

columns

Inputs

seq | a sequence |

col | a non-negative integer |

Outputs

column | a column |

Word description

Outputs a new virtual sequence which presents a fixed column of a matrix represented as a sequence of rows. The i th element of a column is the n th element of the i th element of seq. Every element of seq must be a sequence, and all sequences must have equal length.

Examples

USING: arrays prettyprint columns ;
{ { 1 2 3 } { 4 5 6 } { 7 8 9 } } 0 <column> >array .

{ 1 4 7 }

{ 1 4 7 }

Notes

In the same sense that <reversed> is a virtual variant of reverse, <column> is a virtual variant of swap [ nth ] curry map.

Definition