On Wednesday, 25 May 2016 at 19:07:32 UTC, Era Scarecrow wrote:
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote:
Why can the tuple be iterated with foreach, as in my quick
fix, and indexed with tuple[0..], but is not accepted as a
range? What are the differences? Is there a way to rangif
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote:
Why can the tuple be iterated with foreach, as in my quick fix,
and indexed with tuple[0..], but is not accepted as a range?
What are the differences? Is there a way to rangify a tuple?
The tuple is identified/used at compile-time, as su
On Wednesday, 25 May 2016 at 14:48:14 UTC, ag0aep6g wrote:
On 05/25/2016 04:39 PM, Chris wrote:
I see. Maybe it would be worth adding a wrapper to
typecons.Tuple or
std.range that helps to rangify tuples.
std.range.only is that wrapper.
Duh! Of course! :-)
I cannot think of any use case
r
On 05/25/2016 04:39 PM, Chris wrote:
I see. Maybe it would be worth adding a wrapper to typecons.Tuple or
std.range that helps to rangify tuples.
std.range.only is that wrapper.
I cannot think of any use case
right now. I never needed this and in the example that started this
thread, it would
On 05/25/2016 03:27 PM, Chris wrote:
Why can the tuple be iterated with foreach, as in my quick fix, and
indexed with tuple[0..], but is not accepted as a range? What are the
differences?
popFront doesn't make sense with a tuple (aka expression list). When you
remove the first element of a tup
On Wednesday, 25 May 2016 at 14:32:11 UTC, ag0aep6g wrote:
On 05/25/2016 03:27 PM, Chris wrote:
Why can the tuple be iterated with foreach, as in my quick
fix, and
indexed with tuple[0..], but is not accepted as a range? What
are the
differences?
popFront doesn't make sense with a tuple (aka
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote:
On Wednesday, 25 May 2016 at 12:08:20 UTC, Steven Schveighoffer
wrote:
On 5/25/16 6:24 AM, pineapple wrote:
On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer
wrote:
Slice assignment from range to array is not supported.
In yo
On Wednesday, 25 May 2016 at 12:08:20 UTC, Steven Schveighoffer
wrote:
On 5/25/16 6:24 AM, pineapple wrote:
On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer
wrote:
Slice assignment from range to array is not supported.
In your example, I'm curious why the efforts to specify the
t
On 5/25/16 6:24 AM, pineapple wrote:
On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer wrote:
Slice assignment from range to array is not supported.
In your example, I'm curious why the efforts to specify the type? I
think it would work with just saying auto itemstrings = ...
I s
On Wednesday, 25 May 2016 at 11:14:26 UTC, FreeSlave wrote:
Works with 'only', 'array' and static array slicing.
import std.algorithm : map;
import std.range : only;
import std.conv : to;
import std.stdio : writeln;
import std.string : join;
import std.array : array;
string test(Args...)(in Ar
On Wednesday, 25 May 2016 at 10:24:19 UTC, pineapple wrote:
On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer
wrote:
Slice assignment from range to array is not supported.
In your example, I'm curious why the efforts to specify the
type? I think it would work with just saying auto
On Tuesday, 24 May 2016 at 20:03:14 UTC, pineapple wrote:
I would've expected this to work, but instead I get a compile
error. Is my syntax wrong? Is this just not a case that map can
handle, and I should be doing something else?
import std.algorithm : map;
import std.conv : to;
im
On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer
wrote:
Slice assignment from range to array is not supported.
In your example, I'm curious why the efforts to specify the
type? I think it would work with just saying auto itemstrings =
...
-Steve
I still get an error if I use a
On 5/24/16 4:03 PM, pineapple wrote:
I would've expected this to work, but instead I get a compile error. Is
my syntax wrong? Is this just not a case that map can handle, and I
should be doing something else?
import std.algorithm : map;
import std.conv : to;
import std.stdio : wri
I would've expected this to work, but instead I get a compile
error. Is my syntax wrong? Is this just not a case that map can
handle, and I should be doing something else?
import std.algorithm : map;
import std.conv : to;
import std.stdio : writeln;
import std.string : join;
15 matches
Mail list logo