rows ( seq matrix -- rows ) (original) (raw)

rows ( seq matrix -- rows )
Matrix operations

Prev: row ( n matrix -- row )
Next: rows-except ( matrix desc -- others )

Vocabulary
math.matrices

Inputs

seq a sequence
matrix a matrix

Outputs

rows a sequence

Word description
Get the rows from matrix listed by seq.

Notes

This word is the multiplexing variant of row.

Examples

USING: math.matrices prettyprint ; { 0 1 } { { 1 2 } { 3 4 } } rows .
{ { 1 2 } { 3 4 } }

Definition

USING: kernel sequences ;

IN: math.matrices

: rows ( seq matrix -- rows ) [ row ] curry map ; inline