On Thu, 27 Mar 2014 02:19:13 -0000, Steven Schveighoffer <schvei...@yahoo.com> wrote:
if(!r.empty)
{
    auto r2 = map!(x => x * 2)(r);
    do
    {
       auto x = r2.front;
       ...
    } while(!r2.empty);
}

if(r.empty)
  return;

auto r2 = map!(x => x * 2)(r);
while(!r2.empty)
{
   auto x = r2.front;
   ...
r2.popFront(); //bug fix for your version which I noticed because I followed "the pattern" :D
}

ahh.. much better.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to