Version française
Home     About     Download     Resources     Contact us    
Browse thread
Disappointment
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Till Crueger <crueger@i...>
Subject: Re: [Caml-list] Disappointment
On Mon, 21 Jul 2008 23:28:36 +0200, Paolo Donadeo <p.donadeo@gmail.com>
wrote:
> I like functional programming, but monads [1] must be too little to be
> grabbed by my mind. This time the interest in monads was aroused by
> the interesting article of David Teller, Arnaud Spiwack and Till
> Varoquaux [2] about the error monad, but for using the library they
> wrote I need at least some knowledge about monads and the do-notation.

it might take a while, but it's worth the effort... It took me some time
to get the concept as well. Don't worry it doesn't have to do with your IQ.

> I ask you all: can anyone make me a practical example, something
> involving strings, files, the network, an image or sound processing
> algorithm, something vaguely real? Not abstract mathematical
> structures, beautiful algebraic properties and general statements,
> please: the net is full of such tutorials, especially Haskell fan
> sites ;-)

hmm, very informaly speaking, monads allow you to "wrap up" some other
value, or a set of those... Then of course there are lot's of way's to
wrap something up, so this is really abstract.

One good thing that helped me a lot, was to implement the monads myself in
OCaml, even though i hadn't understood them fully at that time. Try for
example to build your own I/O Monad and it will start to get more clearly
how it works.

> [1] http://en.wikipedia.org/wiki/Monad_(symbol)
I suggest this one instead as a good starting point:
http://en.wikipedia.org/wiki/Monads_in_functional_programming

Good luck,
     Till

p.s. Sorry for everyone who get's this message in error... I am to dumb to  
get the recipient right.. I should go to bed now...



-- 
There is no Keyser Soze.
      -- The Usual Suspects