Proposal: Add variants of tails & inits not returning empty
ndmitchell at gmail.com
Sat Dec 15 11:13:31 EST 2007
> inits1 = tail . inits
> tails1 = init . tails
They look useful, and I have used ones like these before. However, the
name is slightly misleading. foldr1 and foldl1 don't "not return the
empty list", but both crash if given the empty list. These ones do
something very similar and very different from the other ...1
functions, so giving them similar names might result in confusion.
That said, I can't think of anything better.
More information about the Libraries