Logo

Programming-Idioms

History of Idiom 26 > diff from v10 to v11

Edit summary for version 11 by :

Version 10

2015-09-03, 16:16:26

Version 11

2015-09-04, 20:43:49

Idiom #26 Create a 2-dimensional array

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

Idiom #26 Create a 2-dimensional array

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

Code
x = [ j**(1/i) | i <- [1..m], j <- [1..n] ]
Comments bubble
read no need to cast this through (Data.Array.listArray ((1,1),(m,n)))