bad unary function

bearophile bearophileHUGS at lycos.com
Tue Jul 3 13:34:26 PDT 2012


maarten van damme:

> Now I get a variable with the Result type and this isn't 
> castable or convertable to an array of strings,

Right, sorry. (If I don't run the code I show, then it's usually 
broken in some way).


> how can I extract the actual result now?

Often you don't need an array, a lazy range is enough for many 
purposes. But if you really need an array of strings, then write 
something like:

const added = mod.added.map!(x => 
x.toName(parsedschema))().array();

array() is inside the module std.array.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list