<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText>&gt; Actually I stopped bothering long ago about
'understanding monads'.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I think that's a shame, because when I wrote the source
code myself to get from a pure functional approach (passing the
&quot;object&quot; from function to function as an extra argument) to a monadic
approach, it was a real eye opener. Many of the different FP techniques, like <a
href="http://www.haskell.org/haskellwiki/Partial_application">partial
application</a>, <a href="http://www.haskell.org/haskellwiki/Parameter_order">reversed'
parameter order</a>, <a
href="http://www.haskell.org/haskellwiki/Anonymous_function">lambas</a>, <a
href="http://haskell.org/haskellwiki/Pointfree">pointfree notation</a> etc were
required to do this, which might be one of the reasons it&#8217;s a bit difficult for
newbies to see how a monad is just pure FP in disguise. After cracking the code
myself, I had so much appreciation for the guys who invented this stuff, it&#8217;s really
the work of a genius, at least that's the way it felt to me. And then the math
approach to abstract the whole thing into a type class, so it can be used for many
other &quot;single-flow&quot; (or how should I call that?) computations,... so
nice. &nbsp;I can&#8217;t say that I can write a monad instance myself yet without peeking
in the book, but I think I would recognize the pattern if I see code that could
make use of monads (at least the simple cases).<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Now I'm figuring out arrows, and this gives me a feeling
like... euh... well... it's even more abstract, it encapsulates any kind of
computation, also the ones then can be &quot;split into multiple branches&quot;
(okay, I should not talk about this, I don't really get arrows yet...)<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Of course, I'm a kind of guy who likes to understand the
inner details before I'm really pleased... So for Haskell, I still have a long way
to go :)<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>But you seem to be much further ahead than I am when it
comes to *using* monads, so your approach is probably better. Just get used to
the damn things and accept them (ouch, that feels a lot like religion...)<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Cheers,<o:p></o:p></p>

<p class=MsoPlainText>Peter<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>-----Original Message-----<br>
From: dav.vire@gmail.com [mailto:dav.vire@gmail.com] On Behalf Of david48<br>
Sent: Monday, October 15, 2007 9:15 AM<br>
To: bf3@telenet.be<br>
Cc: jerzy.karczmarczuk@info.unicaen.fr; haskell-cafe@haskell.org<br>
Subject: Re: [Haskell-cafe] do<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>On 10/14/07, Peter Verswyvelen &lt;bf3@telenet.be&gt;
wrote:<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; If you want I can dig up my old source code where I
converted a random number<o:p></o:p></p>

<p class=MsoPlainText>&gt; generator from a purely functional approach to a
monadic approach, but I'm not<o:p></o:p></p>

<p class=MsoPlainText>&gt; sure reading it would help you, it's creating the
code yourself that will be useful I<o:p></o:p></p>

<p class=MsoPlainText>&gt; guess.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Actually I stopped bothering long ago about
'understanding monads'.<o:p></o:p></p>

<p class=MsoPlainText>After reading many blog posts, wikis, tutorials, etc,
often multiple<o:p></o:p></p>

<p class=MsoPlainText>times, I developped a fuzzy idea of what you can do using
monads, and<o:p></o:p></p>

<p class=MsoPlainText>that's enough for me to use monads like IO, STM, State,
Parsec, etc.<o:p></o:p></p>

<p class=MsoPlainText>without too much problems.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I use haskell to solve many little problems in my job and
I'm damned<o:p></o:p></p>

<p class=MsoPlainText>sad that I can't use it for larger projects.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>I feel I'm still a long way from identifying a situation
where I would<o:p></o:p></p>

<p class=MsoPlainText>need to write my own monad, and be able to do it, but by
the time such<o:p></o:p></p>

<p class=MsoPlainText>situation arises, I don't think it'd be too much a
problem.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>That being said, I plead guilty of not provinding feeback
where I<o:p></o:p></p>

<p class=MsoPlainText>found the doc lacking.<o:p></o:p></p>

<p class=MsoPlainText>I have no excuse.<o:p></o:p></p>

<p class=MsoPlainText><span style='color:black'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>