Talk:Monad (functional programming): Difference between revisions

Content deleted Content added
Haskell: monads as values/the current cite tag
m Haskell: markup
Line 32:
Shouldn't this either be renamed to something like "Monads in Haskell" with a link to understanding Haskell, or have the equations written in a common mathematical way?
 
:If I understand correctly, monads are containers for values: for example, a monad value like "Just 5" contains the value 5. The return function "wraps" a value inside a monad, the fmap function allows another function to "look inside" a monad value, and it looks like join turns a value like Just (Just 5) into Just 5, or <nowiki>[[3]]</nowiki> into [3]. A few examples:
 
return 3 = either [3] or Just 3 -- "Wrap" the value 3 with a monad