immutable nfields = header.count('\t');
...
output.writeln(cycle("\t-").take(2 * nfields));

Super-win, now I only ever have to update the original column list.

Little things like this are what make me love D.

-Steve

I see that `take` returns a lazy range. That's really neat! How does writeln handle the lazy range though? Standard way of dealing with ranges in D, with calls to empty, front, and popFront (as in, does this code allocate any temporaries at all with the GC?)

Reply via email to