On Friday, 31 October 2014 at 22:13:31 UTC, Jakob Ovrum wrote:
On Friday, 31 October 2014 at 19:09:28 UTC, H. S. Teoh via Digitalmars-d wrote:
Besides, the sink version basically allows encapsulation of an output range -- instead of calling x.toString(outputRange) you just write:

        x.toString((const(char)[] data) { outputRange.put(data); });

In recent compiler versions we can just write:

    x.toString(data => outputRange.put(data));

No need for the extra function, just call:

x.toString(&(outputRange.put));

Reply via email to