How To: Passing curried functions around

welkam via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 6 12:22:39 PDT 2015


I dont know much about functional programming, but what stops you 
defining

int readInt(string prompt, validator_t validator) { ... }

as a free standing function and just call it from both parts of 
your code? What is the benefit of indirection that you create 
when passing function pointer?


More information about the Digitalmars-d-learn mailing list