Question: permutations or something like that

I am looking to create a list-of-lists with all the combinations of 1..7.
The order is not important so for example [1,7] [7,1] should only return [1,7]

ie

[[1],[2],[3],[4],[5],[6],[7],[1,2],[1,3],[1,4],[1,5],[1,6],[1,7],

[2,2], [3,3], [4,4] ......................
[3,2]...................
.......
[7,2].............

[1,2,1]........

[1,2,2].......     ]

 

I am no sure I am explaining it well but the thing that I dont like with
the permute command is again that that I get multiple elements containing
the same thing with a different order [1,2] [2,1]. I dont want that.


with(combinat):  permute(7, 2);

 [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [2, 1], [2, 3], [2, 4],

   [2, 5], [2, 6], [2, 7], [3, 1], [3, 2], [3, 4], [3, 5], [3, 6], [3, 7],

   [4, 1], [4, 2], [4, 3], [4, 5], [4, 6], [4, 7], [5, 1], [5, 2], [5, 3],

   [5, 4], [5, 6], [5, 7], [6, 1], [6, 2], [6, 3], [6, 4], [6, 5], [6, 7],

   [7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 6]]
                            


Please Wait...