Comprehensions will give you what you want

x = [1,2,3]
pairs = Vector[[i,j] for i in x, j in x] |> vec

On Thursday, June 19, 2014 12:16:32 PM UTC-7, paul analyst wrote:

How to convert vector to a series of possible pairs of elements  ? 
>
> [1,2,3] 
>
> I expect 
>
> [1,1] [1,2] [1,3] [2,1] [2,2] [2,3] [3,1] [3,2] [3,3]
>
> ​

Reply via email to