What is the groovy way for doing this initialization? -


Hello, what's the way to do this kind of initialization? For (j = 0; j & lt; 20; j ++) (<= 0) for i ; K & lt; 20; k ++) m [i] [j] [k] = 'a'

It can:

  (0..9) .each {i - & gt; (0..19) .each {j - & gt; (0..19) .each {k - & gt; I [i] [j] [k] = 'a'}}}    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -