On Thursday, 11 February 2016 at 12:53:20 UTC, Edwin van Leeuwen wrote:
I'd do it like this:

import std.algorithm : map;
pars.map!((part) => part.toString) // Turn them to strings
 .join(" ").writeln; // Join them.

You can shorten this by using std.conv.to. Also keep in mind that `join` will allocate, but `std.algorithm.joiner` will not.

Ex.

//No allocations done, not even to!string
pars.map!(to!string).joiner(" ").writeln;

Reply via email to