On Saturday, 9 June 2018 at 20:03:15 UTC, OlegZ wrote:
auto hz = (string s) => { writeln( s ); return cast( int )s.length; }How I should to write lambda of type "int delegate( string )?
I found one way:
auto hz = delegate int( string s ) { writeln( s ); return cast( int )s.length; };
but still don't understand why
return cast( int )s.length;
at topmost line returns "int delegate()" not just int?