int[] data; import std.range: only, iota; data.append(-1, 0, only(1, 2, 3), iota(4, 9)); assert(data == [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8]); data.append(9, 10); assert(data == [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); data.append([11, 12], [13, 14]); assert(data == [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]); // int[3] d; // data.append(d, d); static assert(!__traits(compiles, { data.append(); }));
http://forum.dlang.org/thread/mevnosveagdiswkxtbrv@forum.dlang.org?page=1
Append arguments args to data.