On Mon, Oct 12, 2009 at 6:22 PM, Kim-Ee Yeoh <a.biurvo...@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.
>
How about

m <**> n = pure (<*>) <*> m <*> n

Hth,

Josef
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to