Logo

Programming-Idioms

History of Idiom 26 > diff from v52 to v53

Edit summary for version 53 by JohanW:
New Elixir implementation by user [JohanW]

Version 52

2019-02-16, 07:58:56

Version 53

2019-03-08, 10:10:46

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
x = for _ <- 1..m, do: for _ <- 1..n, do: 0.0
Doc URL
https://hexdocs.pm/elixir/Kernel.SpecialForms.html#for/1