map!(char)(string) problem

2014-05-03 Thread David Held via Digitalmars-d-learn
import std.algorithm; int toInt(char c) { return 1; } void main() { map!(a = toInt(a))(hello); } Can someone please explain why I get this: Bug.d(10): Error: function Bug.toInt (char c) is not callable using argument types (dchar)

Re: map!(char)(string) problem

2014-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Sat, 03 May 2014 14:47:56 -0700 David Held via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: import std.algorithm; int toInt(char c) { return 1; } void main() { map!(a = toInt(a))(hello); } Can someone please explain why I get this: Bug.d(10): Error: