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 E2E1BBBAF for ; Tue, 22 Jul 2008 08:50:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEALofhUjVujhf/2dsb2JhbACvPQ X-IronPort-AV: E=Sophos;i="4.31,229,1215381600"; d="scan'208";a="27556904" Received: from witko.kerneis.info ([213.186.56.95]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 22 Jul 2008 08:50:11 +0200 Received: from localhost ([127.0.0.1] helo=kerneis.info) by witko.kerneis.info with esmtp (Exim 4.63) (envelope-from ) id 1KLBhK-0002Wh-66; Tue, 22 Jul 2008 08:50:10 +0200 Received: from 82.224.215.18 (SquirrelMail authenticated user gabriel) by kerneis.info with HTTP; Tue, 22 Jul 2008 08:50:10 +0200 (CEST) Message-ID: <49383.82.224.215.18.1216709410.squirrel@kerneis.info> In-Reply-To: <4b5157c30807211428r19ef9865n6a65e81ac2f5fe31@mail.gmail.com> References: <4b5157c30807211428r19ef9865n6a65e81ac2f5fe31@mail.gmail.com> Date: Tue, 22 Jul 2008 08:50:10 +0200 (CEST) From: "Gabriel Kerneis" To: "Paolo Donadeo" Cc: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: gabriel@kerneis.info Subject: Re: [Caml-list] Disappointment X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on witko.kerneis.info) X-Spam: no; 0.00; vaguely:01 haskell:01 monads:01 monads:01 monadic:01 categorical:01 lesson:98 abstract:01 abstract:01 caml-list:01 xleroy:01 xleroy:01 strings:01 algorithm:01 caml:02 Hi, > 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 ;-) Xavier Leroy's lesson on monads [1] will certainly be too abstract for you, but the accompanying Caml code [2] might help you to grasp the concept. You will find there a lot of example of useful monads. You should have read some tutorial before, though, not to get lost. Another very concrete example is Lwt [3], a cooperative thread library written in monadic style. Don't hesitate to follow the link, it's a documentation targeted at programmers, without categorical issues and so on. You will need to read a more general tutorial on monads then, to get the general idea, but it could be a good starting point to "bind" and "return" operators. [1] http://gallium.inria.fr/~xleroy/mpri/progfunc/monads.2up.pdf [2] http://gallium.inria.fr/~xleroy/mpri/progfunc/monads.ml [3] http://ocsigen.org/lwt Regards, -- Gabriel Kerneis