Simplify a powerset function in C# I would like to simplify to following function as much as possible:

public string[] GetPowerSet(string input)
    {
        IEnumerable&lt;IEnumerable&lt;string&gt;&gt; seed = new List&lt;IEnumerable&lt;string&gt;&gt;() { Enumerable.Empty&lt;string&gt;() };

        return input.Split(',').ToList().Aggregate(seed, (a, b) =&gt;
          a.Concat(a.Select(x =&gt; x.Concat(new List&lt;string&gt;() { b })))).Select(subset =&gt; string.Join(",", subset.ToArray())).Skip(1).ToArray();
    }
Can't say I've simplified it much... but I've removed some syntactic extras that were unnecessary in the original version, made the method itself static (no reliance on instance data or methods) and hoisted out the seed to a one-time initialized class-level variable for speed/GC (over multiple calls) sake:

private static readonly IEnumerable&lt;IEnumerable&lt;string&gt;&gt; seed =
    new List&lt;IEnumerable&lt;string&gt;&gt; { Enumerable.Empty&lt;string&gt;() };

public static string[] GetPowerSet(string input)
{
    return input.Split(',').Aggregate(
        seed,
        (a, b) =&gt; a.Concat(a.Select(x =&gt; x.Concat(new[] { b })))).Select(subset =&gt; string.Join(",", subset)).Skip(1).ToArray();
}