[Haskell-cafe] [announcement] filtrable: class of filtrable containers

Chris Wong lambda.fairy at gmail.com
Thu Feb 18 06:03:23 UTC 2016


On Thu, Feb 18, 2016 at 1:57 PM, martin <monkleyon at googlemail.com> wrote:
> The only need for the functor requirement is in the default definition
> of mapMaybe - so why not drop it?

Since fmap can be defined in terms of mapMaybe:

    fmap f = mapMaybe (Just . f)

Filtrable should imply Functor in the same way that Traversable
implies Foldable.

-- 
Chris Wong (https://lambda.xyz)

"I had not the vaguest idea what this meant and when I could not
remember the words, my tutor threw the book at my head, which did not
stimulate my intellect in any way." -- Bertrand Russell


More information about the Haskell-Cafe mailing list