What I want to do is: I want to take a look at every single solution and extend it if it is possible (eg. if solution contains obbects a,b,c it can also contain d).
void main()
{
import std.stdio;
int[][] data = [ [ 0, 1, 2], [2, 3, 4] ];
foreach(ref arr; data)
{
if (arr[0] == 2)
arr ~= 5;
}
writeln(data);
}?(original arrays can be also allocated with extra capacity to avoid copy-allocation upon extending)
