I have the following list:
List(a, b, c, d, e)
How to create all possible combinations from the above list?
I expect something like:
val xs = List( 'a', 'b' , 'c' , 'd' , 'e' ) (1 to xs.length flatMap (x => xs.combinations(x))) map ( x => x.mkString(""))
This should give you all the combination concatenated by empty String.