col ( n matrix -- col ) - Factor Documentation

col ( n matrix -- col )
Matrix operations



Vocabulary
math .matrices

Inputs
n an integer
matrix a matrix


Outputs
col a sequence


Word description
Get the nth column of the matrix.

Notes
Like most Factor sequences, indexing is 0-based. The first column is given by m 0 col.

Examples
USING: kernel math.matrices prettyprint ; { { 1 2 } { 3 4 } } 1 swap col .
{ 2 4 }


Definition
USING: kernel sequences ;

IN: math.matrices

: col ( n matrix -- col ) swap [ swap nth ] curry map ; inline

AltStyle によって変換されたページ (->オリジナル) /