Vocabularymath.
matricesInputsOutputsNone
Word descriptionApplies
matrix-set-nth to
matrix for each
row, column pair in
pairs, setting the elements to
obj.
Side effectsModifies
matrixNotes• | This word is the multiplexing variant of matrix-set-nth. |
• | This word is intended for use with "flat" (2-dimensional) matrices. |
Errors• | bounds-error if the first element of a pair in pairs is greater than the maximum row index in matrix |
• | bounds-error if the second element of a pair in pairs is greater than the maximum column index in matrix |
• | Throws an error if the sequence cannot hold elements of the given type. |
ExamplesChange both entries on row 1.
USING: math.matrices kernel prettyprint ;
{ { 0 1 } { 2 3 } } "a" { { 1 0 } { 1 1 } } pick matrix-set-nths .
{ { 0 1 } { "a" "a" } }
Definition