Shout out to D at cppcon, when talkign about ranges.

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 8 05:53:22 PDT 2015


The backward range can have an input range interface, like retro:

void is_word_boundary(Bidi r)
{
     bool is_word_prev = r.prev.empty ? false : 
isword(r.prev.front);
     bool is_word_this = r.empty ? false : isword(r.front);
     return is_word_prev != is_word_this;
}


More information about the Digitalmars-d mailing list