Question: Creat reverse order sequence

Hi all,

seq(a[i],i=1..3);

Works fine.

seq(a[i],i=3..1);

gives nothing.

But if what I really want, is a ordered sequence

for i from 3 by -1 to 1 do

r:=[op(r),a[i]];

end do;

a[3],a[2],a[1]

What's the best way to get it? (apart from writing a loop)

 

Casper

Please Wait...