Given a list say
{"a", "b", "c", "d"}
Is there any easier way to generate list of sequential subsets like this (order of the result is not important)
{
{"a"},
{"a b"},
{"a b c"},
{"a b c d"},
{"b"},
{"b c"},
{"b c d"},
{"c"},
{"c d"},
{"d"}
}
I think I like this best of all:
With the string joining:
In a similar vein, specific to strings:
Since Nasser says I am cheating, here is a more manual approach that also has greater efficiency on large sets: