What's a good example for a Haskell functor that is not an applied functor?

Learning functors in Haskell for example. [Integer]

or [] Integer

, I understand that the functor needs to be defined fmap

(in the list example:) fmap = map

. If I get it right, the functor can implement a sequential application <*>

to become an applied functor. That's why

[(1+), (2+)]


is a wonderful item in the list of instances [] Integer

. And an expression like

(+) <$> [1..10] <*> [101..110]


has the meaning.

The instance examples Functor

I found were also applicative functors. That is, there was a reasonable definition <*>

. Typical examples for functors. Perhaps [] or e, Tree, e →, Pair, (,) e, ... are also applicative (ie, there is a reasonable definition <*>

). From what I understand, they are all monads, even!

I found ZipList

as an example an applicative functor that is not a monad ( for some reason ).

Now there is a functor that is not an applied functor and sanely?


source to share

All Articles