Sometimes in non-performance-critical code, it's nice to be able to see whether a value is in a range in one line of code, in a straightforward way. There is no *clean, straightforward* way to do this with std.algorithm.find. The old std.algorithm had a canFind() function. The canFindSorted() function was retained and I find it extremely useful for building space-efficient finite sets from arrays. Please bring back canFind().
I was hoping that find(...).empty is brief enough. Isn't it?
It is. But a note in the docs would be nice. An example would be enough: // Checking if the element can be found in the range assert(find(a, 5).empty);
Sounds good. I just never realized it was this easy. I'll close this bug report. Just please keep canFindSorted because find(assumeSorted(...)).empty is just too much typing when using an array as a space-efficient finite set.