m+n ( m n -- m )
Matrix operations

Prev:mneg ( m -- m' )
Next:m-n ( m n -- m )


Vocabulary
math.matrices

Inputs
ma matrix
nan object


Outputs
ma matrix


Word description
n is treated as a scalar and added to each element of the matrix m.

Notes
This word is the swapped variant of n+m.
This word is intended for use with "flat" (2-dimensional) matrices.
This word assumes that elements of the input matrix are compatible with the following words:
+ ( x y -- z )


Examples
USING: kernel math.matrices prettyprint ; 3 <identity-matrix> 1 m+n .
{ { 2 1 1 } { 1 2 1 } { 1 1 2 } }


Definition