On Tue, 11 Feb 2014 17:11:46 -0000, Ali Çehreli <acehr...@yahoo.com> wrote:
On 02/11/2014 06:25 AM, Rene Zwanenburg wrote:
On Tuesday, 11 February 2014 at 10:10:27 UTC, Regan Heath wrote:
foreach (i, line; range.take(4)) //Error: cannot infer argument
types
{
..etc..
}
foreach (i, line; iota(size_t.max).zip(range.take(4)))
{
}
There is also the following, relying on tuples' automatic expansion in
foreach:
foreach (i, element; zip(sequence!"n", range.take(4))) {
// ...
}
Thanks for the workarounds. :) Both seem needlessly opaque, but I
realise you're not suggesting these are better than the original, just
that they actually work today.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/