I am having hard time making sense of the types in the following example
from the Applicative Programming paper:
http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf
ap :: Monad m ⇒ m (a → b ) → m a → m b
ap mf mx = do
f ← mf
x ← mx
return (f x )
Using this function we could rewrite sequence
On 2008 Sep 24, at 22:51, Daryoush Mehrtash wrote:
I am having hard time making sense of the types in the following
example from the Applicative Programming paper: http://www.cs.nott.ac.uk/~ctm/IdiomLite.pdf
ap :: Monad m ⇒ m (a → b ) → m a → m b
ap mf mx = do
f ← mf
x ← mx
return