Array Initialization: Difference between revisions

m
Line 263:
 
// There are no true "multi-dimensional" arrays in Groovy (as in most C-derived languages).
// Use lists of lists in natural ("row major") order as a stand in.
def d = (0..1).collect { i -> (1..5).collect { j -> 2**(5*i+j) as double } }
def e = [ [ 1.0, 2.0, 3.0, 4.0 ],
Anonymous user