Say I have a list of 3 symbols :
l:`s1`s2`s3
What is the q-way to generate the following list of n*(n+1)/2 permutations?
(`s1;`s1),(`s1;`s2),(`s1;`s3),(`s2;`s2),(`s2;`s3),(`s3;`s3)
This can be seen as in the context of correlation matrix, where I want all the upper triangular part of the correlation matrix, including the diagonal.
Of course the size of my initial list will exceed 3, so I would like a generic function to perform this operation.
I know how to generate the diagonal elements:
q) {(x,y)}'[l;l]
(`s1`s1;`s2`s2;`s3`s3)
But I don't know how to generate the non-diagonal elements.