Re: chaining chain Result and underlying object of chain

2015-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/14/15 11:30 AM, Ali Çehreli wrote: On 09/14/2015 08:01 AM, Laeeth Isharc wrote: > I was trying to use the same variable eg > >auto chain1 = chain("foo", "bar"); >chain1 = chain(chain1, "baz"); [...] > It may be that the type of chain1 > and chain2 don't mix. Exactly.

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread John Colvin via Digitalmars-d-learn
On Monday, 14 September 2015 at 14:17:51 UTC, Laeeth Isharc wrote: chain doesn't seem to compile if I try and chain a chain of two strings and another string. what should I use instead? Laeeth. Works for me: http://dpaste.dzfl.pl/a692281f7a80

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread cym13 via Digitalmars-d-learn
On Monday, 14 September 2015 at 14:17:51 UTC, Laeeth Isharc wrote: chain doesn't seem to compile if I try and chain a chain of two strings and another string. what should I use instead? Laeeth. std.algorithm.iteration.joiner?

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread anonymous via Digitalmars-d-learn
On Monday 14 September 2015 16:17, Laeeth Isharc wrote: > chain doesn't seem to compile if I try and chain a chain of two > strings and another string. > > what should I use instead? Please show code, always. A simple test works for me: import std.algorithm: equal; import std.range:

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread Laeeth Isharc via Digitalmars-d-learn
On Monday, 14 September 2015 at 14:31:33 UTC, anonymous wrote: On Monday 14 September 2015 16:17, Laeeth Isharc wrote: chain doesn't seem to compile if I try and chain a chain of two strings and another string. what should I use instead? Please show code, always. A simple test works for

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread anonymous via Digitalmars-d-learn
On Monday 14 September 2015 17:01, Laeeth Isharc wrote: >auto chain1 = chain("foo", "bar"); >chain1 = chain(chain1, "baz"); > > Realized that in this case it was much simpler just to use the > delegate version of toString and sink (which I had forgotten > about). But I

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread John Colvin via Digitalmars-d-learn
On Monday, 14 September 2015 at 15:30:14 UTC, Ali Çehreli wrote: On 09/14/2015 08:01 AM, Laeeth Isharc wrote: > I was trying to use the same variable eg > >auto chain1 = chain("foo", "bar"); >chain1 = chain(chain1, "baz"); [...] > It may be that the type of chain1 > and chain2

Re: chaining chain Result and underlying object of chain

2015-09-14 Thread Ali Çehreli via Digitalmars-d-learn
On 09/14/2015 08:01 AM, Laeeth Isharc wrote: > I was trying to use the same variable eg > >auto chain1 = chain("foo", "bar"); >chain1 = chain(chain1, "baz"); [...] > It may be that the type of chain1 > and chain2 don't mix. Exactly. I was going to recommend using pragma(msg,