<p>Note that at least for the dropWhile example, there is a specialized function, dropWhileEnd, which is most likely more efficient than reversing the list twice.</p>
<div class="gmail_quote">On Aug 17, 2013 3:35 PM, &quot;Tom Ellis&quot; &lt;<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, Aug 17, 2013 at 11:11:07AM +0200, Christopher Done wrote:<br>
&gt; Anyone ever needed this? Me and John Wiegley were discussing a decent<br>
&gt; name for it, John suggested inv as in involution. E.g.<br>
&gt;<br>
&gt; inv reverse (take 10)<br>
&gt; inv reverse (dropWhile isDigit)<br>
&gt; trim = inv reverse (dropWhile isSpace) . dropWhile isSpace<br>
<br>
This sounds like a job for a lens, or similar.<br>
<br>
Tom<br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>