Trying to modularise some latex table generation code, massive gold plating.
var MIDRULE = @"\\\midrule";
var a = new []{new []{"a", "b", "c"}, new []{"1", "2", "3"}, new []{"alpha", "beta", "gamma"}};
a.Dump();
a.Aggregate(
(x,y) => x.Aggregate((i,j) => i + "&" + j)
+ MIDRULE + Environment.NewLine
+ y.Aggregate((k,l)=>k+"&"+l)).Dump();
Expected result:
a&b&c\\\midrule
1&2&3\\\midrule
alpha&beta&gamma\\\midrule
Actual result:
Cannot implicitly convert type 'string' to 'string[]'
I'd like to do this with a one liner of aggregate commands if possible, can already do this in a nested loop or various other ways, I'm interested in getting to know aggregation better.