<div dir="ltr"><div>Thank you, that&#39;s exactly what I was looking for!<br></div>I didn&#39;t spot &quot;elem&quot; so far... that&#39;s why I was looking into &quot;and&quot; which was too complex for this case.<br><br>
Thanks again!<br><br>emmanuel<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 9:44 PM, Felipe Almeida Lessa <span dir="ltr">&lt;<a href="mailto:felipe.lessa@gmail.com" target="_blank">felipe.lessa@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Well, you could use:<br>
<br>
    null . dropWhile (`elem` &quot;./&quot;)<br>
<br>
=)<br>
<div><div class="h5"><br>
On Wed, May 29, 2013 at 4:38 PM, Emmanuel Touzery &lt;<a href="mailto:etouzery@gmail.com">etouzery@gmail.com</a>&gt; wrote:<br>
&gt; hi,<br>
&gt;<br>
&gt;  i want to know if a string contains only &quot;.&quot; and &quot;/&quot; characters.<br>
&gt;<br>
&gt;  i do something like that:<br>
&gt;<br>
&gt; null . dropWhile (\c -&gt; c == &#39;.&#39; || c == &#39;/&#39;)<br>
&gt;<br>
&gt;   now it&#39;s a shame, because if I wanted only to check for &quot;.&quot; then I would<br>
&gt; have:<br>
&gt;<br>
&gt; null . dropWhile (==&#39;.&#39;)<br>
&gt;<br>
&gt;    afaik in scala you can say:<br>
&gt;<br>
&gt; null . dropWhile (_ == &#39;.&#39; || _ == &#39;/&#39;)<br>
&gt;<br>
&gt;    which is a bit more compact than the haskell...<br>
&gt;<br>
&gt;    I was thinking to use &quot;and&quot; but I&#39;m not sure it would end up being<br>
&gt; readable...<br>
&gt;<br>
&gt;    Any idea? Or I am trying too hard to make it compact?<br>
&gt;<br>
&gt; Emmanuel<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Beginners mailing list<br>
&gt; <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Felipe.<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</font></span></blockquote></div><br></div>