Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
monad_._haskell [2014/09/11 23:08] nikolaj |
monad_._haskell [2014/09/13 18:11] nikolaj |
||
---|---|---|---|
Line 87: | Line 87: | ||
(<*>) :: m (a -> b) -> m a -> m b | (<*>) :: m (a -> b) -> m a -> m b | ||
(<*>) mg ma = liftM2 id mg my | (<*>) mg ma = liftM2 id mg my | ||
+ | -- or = join $ fmap (\g -> fmap g mx) mg | ||
</code> | </code> | ||
+ | |||
Note that conversely, '<*>' doesn't suffice to define a '>>='. | Note that conversely, '<*>' doesn't suffice to define a '>>='. | ||