Logo

Programming-Idioms

History of Idiom 26 > diff from v48 to v49

Edit summary for version 49 by Alexander:
[Clojure] Simplifying to static value in all cells

Version 48

2019-02-16, 07:47:09

Version 49

2019-02-16, 07:49:34

Idiom #26 Create a 2-dimensional array

Declare and initialize a matrix x having m rows and n columns, containing real numbers.

Illustration

Idiom #26 Create a 2-dimensional array

Declare and initialize a matrix x having m rows and n columns, containing real numbers.

Illustration
Code
(for [r (range m)]
  (for [c (range n)]
    (* r c)))
Code
(for [r (range m)]
  (for [c (range n)]
    1.0))
Comments bubble
Matrix m by n matrix filled with the number 1.0