Question: Add the successive outputs from a for loop to a list - how?

I use a simple for loop below to illustrate. For each loop through the index value I want to add the result of that loop to a list h. This is how I tried to do it but I can't quite get it because the value in h1 gets updated for each step through the for loop.

 

for i from 1 to 10 do

u[i]:=2*i;

h:=[]; h1:=[u[i],op(h)]

end do;

So after the for loop is terminated I want to be left with a list h:= [2,4,6,8,10,12,14,16,18,20]. Its probably a quick fix but I'm stuck and would appreciate any help/advice.  

 

Please Wait...