14 Dec 17:14
Proposal: Add variants of tails & inits not returning empty lists
From: Maxime Henrion <mux <at> FreeBSD.org>
Subject: Proposal: Add variants of tails & inits not returning empty lists
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2007-12-14 16:17:38 GMT
Subject: Proposal: Add variants of tails & inits not returning empty lists
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2007-12-14 16:17:38 GMT
Hi all, I just opened a Trac ticket (#1979), to suggest the addition of the inits1 and tails1 functions, which don't return empty lists unlike their counterpart. They're defined as such : inits1 = tail . inits tails1 = init . tails I've needed them a few times so I thought they would make a nice addition to the base package. And, I've got to say, the symmetry in this code is is nice. http://hackage.haskell.org/trac/ghc/ticket/1979 Cheers, Maxime
.
RSS Feed