
15 Dec
2007
15 Dec
'07
11:13 a.m.
Hi Maxime,
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. Thanks Neil