I'd like to generate all possible unique combinations of a set of characters. For example, with the set [a,b], we'd get [[a,a],[a,b],[b,b]]. I've been looking to find even a formula giving me the number of possibilities, without success... Is it possible ? Of course I could bruteforce the answer, but that's not efficiency, nor even possible once we start ramping up the numbers.
Thanks for your time.