[Haskell-beginners] Understanding Monads: Help with 20 Intermediate Haskell Exercises

Imants Cekusins imantc at gmail.com
Wed May 18 15:58:13 UTC 2016


Hello Tushar,

maybe this makes it look a bit clearer:

class Misty m where
  banana:: (f -> m b) -> m f -> m b
  furry':: (a -> b) -> m a -> m b


apple::Misty m =>
    m a -> m (a -> b) -> m b
apple ma mf = banana (\f -> furry' f ma) mf


in a word: 'a' in banana may be a function
f = a -> b
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160518/edd99b3d/attachment.html>


More information about the Beginners mailing list