On 6/25/07, Lloyd Linklater <lloyd / 2live4.com> wrote:
> Gregory Brown wrote:
> > I'm far too lazy.
> >
> > I'd just do
> >
> > a = [[0]*5]]*5
>
> But that does not quite allow the free use of method calls.  e.g. dice
> rolling:
>
> p [[rand(6) + 1] * 4] * 4
> [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]

I posted again saying you shouldn't use the approach I mentioned
because it creates copies of the same array.