[Haskell-cafe] do

Peter Verswyvelen bf3 at telenet.be
Mon Oct 15 05:03:57 EDT 2007

> Actually I stopped bothering long ago about 'understanding monads'.


I think that's a shame, because when I wrote the source code myself to get
from a pure functional approach (passing the "object" 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 partial
<http://www.haskell.org/haskellwiki/Partial_application>  application,
reversed' <http://www.haskell.org/haskellwiki/Parameter_order>  parameter
order, lambas <http://www.haskell.org/haskellwiki/Anonymous_function> ,
pointfree notation <http://haskell.org/haskellwiki/Pointfree>  etc were
required to do this, which might be one of the reasons it'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'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 "single-flow" (or how should I call
that?) computations,... so nice.  I can'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).


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 "split into multiple branches" (okay, I should not
talk about this, I don't really get arrows yet...)


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


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...)





-----Original Message-----
From: dav.vire at gmail.com [mailto:dav.vire at gmail.com] On Behalf Of david48
Sent: Monday, October 15, 2007 9:15 AM
To: bf3 at telenet.be
Cc: jerzy.karczmarczuk at info.unicaen.fr; haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] do


On 10/14/07, Peter Verswyvelen <bf3 at telenet.be> wrote:


> If you want I can dig up my old source code where I converted a random

> generator from a purely functional approach to a monadic approach, but I'm

> sure reading it would help you, it's creating the code yourself that will
be useful I

> guess.


Actually I stopped bothering long ago about 'understanding monads'.

After reading many blog posts, wikis, tutorials, etc, often multiple

times, I developped a fuzzy idea of what you can do using monads, and

that's enough for me to use monads like IO, STM, State, Parsec, etc.

without too much problems.


I use haskell to solve many little problems in my job and I'm damned

sad that I can't use it for larger projects.


I feel I'm still a long way from identifying a situation where I would

need to write my own monad, and be able to do it, but by the time such

situation arises, I don't think it'd be too much a problem.


That being said, I plead guilty of not provinding feeback where I

found the doc lacking.

I have no excuse.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071015/61bb905a/attachment-0001.htm

More information about the Haskell-Cafe mailing list