import std.stdio, std.traits;
void main(string[] args) { auto foo(T)(T n) { return delegate(T i) { static if (isSomeString!(T)) auto m = mixin("n ~ i"); else auto m = mixin("n + i"); return m; }; } writeln(foo("Hello")(" World!")); writeln(foo(18)(24)); }