question about function definition



A user (and friend) asked me:

I've been using Maxima for a project at work but have a little problem 
defining arrays of functions:
 
(%i13) kill(w);
(%o13) done
(%i14) i:1;
(%o14) 1
(%i15) w[i](t) := t^i;
(%o15) w[i](t):=t^i
(%i16) w[2](t);
(%o16) t^2
 
The assignment %i15 seems to think i is a free variable instead of having 
the fixed value of 1. How can I change %i15 so only w[1] is affected?
I suggested:

 (%i1) i : 1$
(%i2) define (w[i](x), x^i);
(%o2) w[1](x):=x

(%i3) w[1](z);
(%o3) z

(%i4) w[1];
(%o4) lambda([x],x)

(%i5) w[2](42);
(%o5) w[2](42)

but I'm not an expert with such things.  Is there a better way? 

BW