Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm sorry I don't know of articles or books which cover in detail the different usages for all of those constructs, but I can give you a few links to individual resources.</p> <p>A quite common pattern is to build <a href="http://en.wikibooks.org/wiki/Haskell/Monad_transformers" rel="nofollow noreferrer">monad transformers</a> instead of simple monads (see also the link in the next paragraph). It basically means you build something that must be combined with other monads, resulting in a more complex one able to handle features of both of them.</p> <p>In <em>Real World Haskell</em> there are a few chapters about monads. In <a href="http://book.realworldhaskell.org/read/monads.html" rel="nofollow noreferrer">Chapter 14. Monads</a> the authors explain the basics and some common usages (maybe, list, state). <a href="http://book.realworldhaskell.org/read/programming-with-monads.html" rel="nofollow noreferrer">Chapter 15. Programming with monads</a> provides more explanations about how to effectively use them (it covers the reader monad as well). The following chapter explains how to use <a href="http://www.haskell.org/haskellwiki/Parsec" rel="nofollow noreferrer">Parsec</a>, but it may be more interesting to search for articles covering how it actually works: it should be a really good example of a well-organized use of monads for parsing. Fianlly, <a href="http://book.realworldhaskell.org/read/monad-transformers.html" rel="nofollow noreferrer">Chapter 18. Monad transformers</a> introduces how monad transformers work and then shows how to build one, step by step. The considerations towards the final sections of the chapter are also interesting.</p> <p>I read once a really interesting question on SO about <a href="https://stackoverflow.com/questions/412929/creative-uses-of-monads">creative uses of monads</a>. The proposed links were awesome reads about the topic. With that spirit, I tried to ask the same for <a href="https://stackoverflow.com/questions/9657387/creative-uses-of-arrows">arrows</a>: I definitely got less answers than the one on monads, but interesting ones nevertheless.</p> <hr> <p>With respect to OOP patterns by the gang of four, there is a nice set of 3 articles by IBM about the topic in their series <a href="http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=functional%20thinking:" rel="nofollow noreferrer">Functional thinking</a>. The target functional language is Scala. They proceed by explaining usual design patterns in OOP and showing how they map into Scala.</p> <ol> <li><a href="http://www.ibm.com/developerworks/java/library/j-ft10/index.html" rel="nofollow noreferrer">Functional thinking: Functional design patterns, Part 1</a>. Here they cover factories, template methods, strategy, flyweight. The bottom line is that by having functions as first class values, everything is much simpler.</li> <li><a href="http://www.ibm.com/developerworks/java/library/j-ft11/" rel="nofollow noreferrer">Functional thinking: Functional design patterns, Part 2</a>. This is about java and <a href="http://en.wikipedia.org/wiki/Groovy_%28programming_language%29" rel="nofollow noreferrer">groovy</a>. It adresses the adapter pattern.</li> <li><a href="http://www.ibm.com/developerworks/java/library/j-ft12/" rel="nofollow noreferrer">Functional thinking: Functional design patterns, Part 3</a>. Here they talk about the interpreter pattern. Again, the target language is groovy.</li> </ol> <p>The most relevant article w.r.t. your question is for sure the first one, but the other two may be interesting related readings nevertheless.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload