This is what I want:

struct S { int x; }

void main()
{
    S[] arr = [S(2), S(4), S(6)];
    S s = S(0);
    arr.join(s);  // fails here
    assert(arr == [S(2), S(0), S(4), S(0), S(6)]);
}

Calling join like that fails, specifically it fails because "s" is not
a forward range (I don't know why it's implemented like that..). Is
there some other function which can join with an element as a
separator?

Reply via email to