标签: range d
在D?
答案 0 :(得分:12)
使用std.algorithm.joiner。 e.g。
std.algorithm.joiner
auto ror = [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]; auto joined = joiner(ror); assert(equal(joined, [1, 2, 3, 4, 5, 6, 7, 8, 9]));
答案 1 :(得分:0)
尝试连锁:
http://dlang.org/phobos/std_range.html#chain