<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 January 2014 20:15, Peter Alexander <span dir="ltr"><<a href="mailto:peter.alexander.au@gmail.com" target="_blank">peter.alexander.au@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Saturday, 25 January 2014 at 09:18:24 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 24 January 2014 21:49, Regan Heath <<a href="mailto:regan@netmail.co.nz" target="_blank">regan@netmail.co.nz</a>> wrote:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Fri, 24 Jan 2014 08:21:12 -0000, Jacob Carlborg <<a href="mailto:doob@me.com" target="_blank">doob@me.com</a>> wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would expect "contains" to take a element and check if it exists in the<br>
range.<br>
<br>
</blockquote>
<br>
Except in the case of string, where we also want an overload taking more<br>
than a single element aka a substring.<br>
</div></blockquote>
<br>
<br><div class="im">
A great example of when the string function should not be conflated with<br>
the general function.<br>
</div></blockquote>
<br>
You always want the overload.<br>
<br>
If this works:<br>
<br>
    contains("hello", "el");<br>
<br>
then this should work:<br>
<br>
    contains([1, 2, 3, 4, 5], [2, 3]);<br>
<br>
Special cases are pure evil. There's nothing special about strings in this case.<br>
</blockquote></div><br></div><div class="gmail_extra">Does that work in all cases of strings wrt utf encodings? String normalisation? What about when char and wchar strings are compared? (should that should be handled transparently?)</div>
<div class="gmail_extra">Strings are special, they're almost always special, and rarely conflate with generalisations well.</div><div class="gmail_extra">Strings almost always exposes special cases that aren't useful or relevant for any other context.</div>
</div>