[Haskell-cafe] <**> for nested applicative functors?

Ryan Ingram ryani.spam at gmail.com
Mon Oct 12 12:52:38 EDT 2009


fmap (<*>) :: m (n (a -> b)) -> m (n a -> n b)

so

f <**> x = (fmap (<*>) f) <*> x


On Mon, Oct 12, 2009 at 9:22 AM, Kim-Ee Yeoh <a.biurvOir4 at asuhan.com> wrote:

>
> Does anyone know if it's possible to write the following:
>
> <**> :: (Applicative m, Applicative n) =>
> m (n (a->b)) -> m (n a) -> m (n b)
>
> Clearly, if m and n were monads, it would be trivial.
>
> Rereading the original paper, I didn't see much discussion
> about such nested app. functors.
>
> Any help appreciated.
>
> --
> View this message in context:
> http://www.nabble.com/%3C**%3E-for-nested-applicative-functors--tp25858792p25858792.html
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091012/cb74e785/attachment.html


More information about the Haskell-Cafe mailing list