kill(all);

van=facebook.com/LearningCalculus$

replicate(a,k):=
    block(
              [expr] ,
               expr:a,
              for i: 1 thru k-1 do
                  expr:concat(expr,a),
              expr
         )$

duplicate(a,k):=
    block(
              [expr] ,
               expr:[a],
              for i: 1 thru k-1 do
                  expr:append(expr,[a]),
              expr
         )$

replicate(3,2);

duplicate(replicate(3,2),2);

sequence:[31,33,66,99];

difference:create_list(sequence[i+1]-sequence[i],i,1,3);

extend:[2,33,33,444,444,444];

create_list(i+i,i,1,10);

create_list(duplicate(replicate(i+1,i),i),i,1,4);