我想使用切片運算符從std.range中獲取take函數的返回值的一部分。我的代碼: auto tempChunk = ['a', 'b', 'c', 'd'];
auto a = tempChunk.take(3);
writeln(a[0..2]);
由於採取R的情況下,僅僅是對的char []的別名,我期望這個編譯。但是,編譯器告訴我,Take!(char[]) cannot be
複製http://forum.dlang.org/thread/[email protected]比較響應速度:) 我基本上要能夠做到這樣的東西: auto result = map!((a, b) => a+b)(lockstep(range1, range2)); 有什麼標準使用opApply(Lockstep是)在 結構中圍繞輸入範圍的簡短方法? 而且怎麼樣重新設計的鎖步作爲一個適當的範圍內
我得到 Error: template std.array.Appender!(string).Appender.put does not match any
function template declaration
我試圖使用Appender錯誤。你能告訴我如何使它工作? import std.array;
import std.stdio;
void app(inout