Question: randomly select unique numbers from a list - not using randcomb

I created a small procedure to select a random number from a list. 

pickrand:=proc(num,list)
local a,b,i:
randomize():
a:=nops(list):
for i from 1 to num do
  b||i:=rand(1..a)():
end do:
seq(list[b||i],i=1..num);
end proc:

a:=[3,6,7,8,3,6,5,7,8,9,1,2,3,4]:

pickrand(3,a);

          [8,8,5]

Now it's possible that the two 8's are in two different positions of a, it would be easy to find out I would just type in b1 and b2 and find out the positions.  But supposing 'a' was a set of numbers, how would I use the loop so that I couldn't have repeating numbers.

combinat:-randcomb() is a simple way I was just looking for an alternate. 

Please Wait...