bad unary function

maarten van damme maartenvd1994 at gmail.com
Tue Jul 3 11:58:03 PDT 2012


I  have an array of structs and I've written a function that takes as
argument a struct (and an array but this is besides the point) and
returns a unique string.

I wanted to use map to retrieve a string array of all unique strings
from that array. I've used it this way:
string [] added=map!("toName(a,parsedschema)")(mod.added);

But I get a compilation error:

bad unary function : toName(a,parsedschema) for type randomStruct.

Is my usage of map wrong?
what's the compiler trying to explain?


More information about the Digitalmars-d-learn mailing list