Proposal: Add variants of tails & inits not returning empty lists

Simon Marlow simonmarhaskell at
Mon Jan 28 06:28:23 EST 2008

Maxime Henrion wrote:
> Bulat Ziganshin wrote:
>> Hello Maxime,
>> Friday, December 14, 2007, 7:17:38 PM, you wrote:
>>> I just opened a Trac ticket (#1979), to suggest the addition of the
>> i have dozens of small funcs in my Utils.hs file. every experienced
>> Haskeller has such set. are all these functions should be really added
>> too?
> I am entirely open to discussion about whether these two functions
> are useful enough to fit in the base libraries or not.  I personally
> feel that they are, seeing that I had to use them several times in
> a relatively short period of time.  I thus expect that many others
> have needed to write those functions as well.  This may very well
> turn out to be a completely wrong :-).
> I guess one step towards is the answer would be knowing if you ever
> needed those functions?

For proposals like this, I think we need a significant number of people 
saying "yes please!", otherwise the default is for the code to go in 
without much discussion, and if we're not careful we end up adding things 
that are rarely useful.

My data point: I've never used/needed inits1 or tails1, AFAIR, and I don't 
think "tail.inits" is too hard to write, so I vote against.


More information about the Libraries mailing list