Should this work?
Stanislav Blinov
stanislav.blinov at gmail.com
Fri Jan 24 00:36:07 PST 2014
On Friday, 24 January 2014 at 08:21:12 UTC, Jacob Carlborg wrote:
> On 2014-01-23 21:53, Andrei Alexandrescu wrote:
> I would expect "contains" to take a element and check if it
> exists in the range.
>
> I think "canFind" is just a weird name.
I agree on the latter point. As for "contains"... Well, if we
address the terminology, we should consider that ranges are not
really containers, therefore "contains" would be slightly
incorrect. Perhaps "encounters" or "isWithin"? :)
On a serious note though, "contains" is leagues ahead of
"canFind".
More information about the Digitalmars-d
mailing list