From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7ADE6BBAF for ; Mon, 21 Jul 2008 23:42:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmUAAACghEiD3AgEo2dsb2JhbACBWpBuAQEBAQEBBwUIBxExnBw X-IronPort-AV: E=Sophos;i="4.31,225,1215381600"; d="scan'208";a="27548313" Received: from postfix.iai.uni-bonn.de ([131.220.8.4]) by mail4-smtp-sop.national.inria.fr with ESMTP; 21 Jul 2008 23:42:29 +0200 X-IAI-Env-From: : [212.201.79.26] Received: from reitoei.dyndns.info (pptp-212-201-79-26.pptp.stw-bonn.de [212.201.79.26]) by postfix.iai.uni-bonn.de (Postfix) with ESMTP id F3F465C82C for ; Mon, 21 Jul 2008 23:42:27 +0200 (MEST) (envelope-from crueger@informatik.uni-bonn.de) (envelope-to caml-list@yquem.inria.fr) (1) (internal use: ta=1, tu=1, te=1, am=L, au=crueger) Date: Mon, 21 Jul 2008 23:42:30 +0200 To: "caml-list@yquem.inria.fr" Subject: Re: [Caml-list] Disappointment From: "Till Crueger" Organization: =?iso-8859-15?Q?Universit=E4t_Bonn?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 In-Reply-To: <4b5157c30807211428r19ef9865n6a65e81ac2f5fe31@mail.gmail.com> References: <4b5157c30807211428r19ef9865n6a65e81ac2f5fe31@mail.gmail.com> Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.50 (Linux) X-Spam: no; 0.00; 0200,:01 monads:01 monads:01 vaguely:01 haskell:01 ocaml:01 wikipedia:01 wiki:01 wikipedia:01 wiki:01 aroused:98 wrote:01 wrote:01 arnaud:01 abstract:01 On Mon, 21 Jul 2008 23:28:36 +0200, Paolo Donadeo 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