Is there a way I can pick all n-combinations from a list
Suppose my list is [1,2,3] is there a way I can get the result as
[ [1] , [2] , [3] , [1,2] , [2,3] , [1,3] , [1,2,3] ]
p.s I don's want both [1,2] and [2,1] to be returned.
I'm sorry if the question is framed poorly