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))) {
        // ...
    }

Ali

Reply via email to