On 1/13/20 12:47 PM, H. S. Teoh wrote:

Why not write your own convenience wrapper?

        auto firstElement(R)(R r)
                if (isInputRange!R)
        {
                if (r.empty) throw new Exception(...);
                return r.front;
        }

        auto e = myData.find!(e => blah(e)).firstElement;

I certainly can (and did). I was wondering if there was something in Phobos to do it.

-Steve

Reply via email to