First experience with std.algorithm: I had to resort to writing a
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jun 8 07:41:41 PDT 2010
On 06/08/2010 06:59 AM, bearophile wrote:
> Bernard Helyer:
>> bool contains(T)(const(T)[] l, T a)
>> {
>> foreach(e; l) {
>> if (a == e) {
>> return true;
>> }
>> }
>> return false;
>> }
>
> See also:
> http://d.puremagic.com/issues/show_bug.cgi?id=3923
That issue stems from the fact that find is quite flexible. I agree it
has lost modularity in the process. I'll work on restoring its modularity.
Andrei
More information about the Digitalmars-d
mailing list