I want my coverage analysis to be 100%, how do I skip lines like
assert(0);
from being counted?
On Wednesday, 8 October 2014 at 21:34:54 UTC, anonymous wrote:
You can turn the tuples into ranges with `only`:
writef("%(%(%s %)\n%)", zip(indexes, source).map!(t =>
only(t.expand)));
That works for me, thanks.
By the way my compiler is DMD 2.066.0
Hello!
Consider this code:
+++
import std.stdio;
import std.range;
import std.algorithm;
void printIndexedArray1(T, Range)(T[] source, Range indexes)
{
foreach(row; zip(indexes, source))
{
foreach(col; row) {
write(col, " ");