Woldemort Type can't even call "take" or "array"

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 31 00:32:03 PDT 2015


On 05/31/2015 12:23 AM, kerdemdemir wrote:

 > But when I tried to sort like numArr.sort();
 >
 > Error: template std.algorithm.sorting.sort cannot deduce function from
 > argument types !()(MapResult!(unaryFun, FilterResult!(__lambda3,
 > FilterResult!(__lambda2, char[][][])))).
 >
 > Ok I said I will first copy the range to array then use sort. So I tried
 > numArr.array

Yeah, that's necessary because sort() requires a random access range.

 > Error: no property 'array' for type 'MapResult!

The solution may be as simple as importing std.array (or std.range) but 
we can't be sure without a short but complete code.

Ali



More information about the Digitalmars-d-learn mailing list