Closed adnelson closed 9 years ago
Looks good, we would like to have such a function in the mono-traversable package. It seems like it would be a member of the IsSequence typeclass. We aren't aiming to make everything also work on Sets.
With mono-traversable updated, should we update the cabal file for classy-prelude? Speaking of which, I'm not sure if I should have bumped the cabal version number for that package...
I'll bump the version in mono-traversable, don't worry.
What's the purpose in updating the classy-prelude cabal file?
Never mind, now I see the problem. I'm releasing 0.9.5 right now.
Can this issue be closed then?
Yes, thanks! :)
catMaybes
is a very useful function, and part of theClassyPrelude
. But its usefulness is somewhat limited if it's restricted to lists (it's equally useful for sets, maps, vectors, etc). I'd like to write a generalcatMaybes
function, something like this:Of course one problem here is that we can't use it on sets, because they're not functors. With a sufficiently sophisticated type signature this might be possible, though.
Anyway, would there be an interest in a function like this? If so where would be the best place to put it?