Should this work?

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Sat Jan 25 03:43:02 PST 2014


On Saturday, 25 January 2014 at 10:15:30 UTC, Peter Alexander 
wrote:
> If this works:
>
>     contains("hello", "el");
>
> then this should work:
>
>     contains([1, 2, 3, 4, 5], [2, 3]);
>
> Special cases are pure evil. There's nothing special about 
> strings in this case.

I don't disagree, but naming and intuitive semantics should match 
up. In this case it does not. "contains" signifies  set 
membership.

hasSequence/findSequence would be more appropriate





More information about the Digitalmars-d mailing list