<div dir="ltr"><div><div><div><div><div><div>The discussion period for this proposal is near (31 of May).<br><br></div>So far I count 1 for and 2 against the proposal.<br><br></div>Joachim Breitner made a good enumeration of some advantages of adding these to base. Here is an enumeration of pros:<br><br></div>* Availability in Data.List gives this pattern a common name.<br></div><div><br>* A common name for this makes code easier to read and decreases the risk of getting the definition wrong.<br><br></div><div>* The argument won't have to be repeated, hence making it easier to chain the functions.<br><br></div>* List-fusion potential.<br><br></div><br>Tobias Florek pointed out that `zip <*> tail` can be used to define this inline without the need for repeating the argument and made a reference to the Fairbairn threshold. This is elegant, but I am afraid that people might consider this obscure code golfing if used.<br><br></div><div>Cheers<br></div><div>Johan Holmquist<br></div><div><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Henning Thielemann</b> <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>></span><br>Date: 2016-04-13 13:28 GMT+02:00<br>Subject: Re: Proposal: Add functions to get consecutive elements to Data.List<br>To: Johan Holmquist <<a href="mailto:holmisen@gmail.com">holmisen@gmail.com</a>><br>Cc: Haskell Libraries <<a href="mailto:libraries@haskell.org">libraries@haskell.org</a>><br><br><br><span class=""><br>
On Wed, 13 Apr 2016, Johan Holmquist wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It is not strictly more general because it cannot handle empty sequences.<br>
</blockquote>
<br></span>
Think of it as if it handles the non-[] case.<br>
</div><br></div></div>