Question: Creating a table from IF statement

Dear, I would like to kindly request your help with the following problem I have: 

L:= [0, 3,0,7];

for i from 1 to 4 do
if L[i] > 0 then 
x[i]:= [L[i]/2]
end if;
end do;

I need to write the elements x[i] as a list, however if I type x[i];  Maple just returns the last value of L[i]/2, namely 7/2. I do not know how to obtain the full list [3/2, 7/2]. What am I doing wrongly?

Many thanks in advance for your kind help. 

Please Wait...