From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 2C13A81799 for ; Tue, 23 Jul 2013 04:15:29 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of krismicinski@gmail.com) identity=pra; client-ip=209.85.219.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of krismicinski@gmail.com designates 209.85.219.45 as permitted sender) identity=mailfrom; client-ip=209.85.219.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="krismicinski@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oa0-f45.google.com) identity=helo; client-ip=209.85.219.45; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="krismicinski@gmail.com"; x-sender="postmaster@mail-oa0-f45.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8CAPjm7VHRVdstlGdsb2JhbABbgztQsWaGFog5gQ4IFg4BAQEBBwsLCRIqgiQBAQQBQAEbHQEDAQsGBQQHOyIBEQEFARwZCId1AQMJBgybFIxPgn+EWAoZJw1kh3QBBQyNN4JTBxaDaAOXXYEpjj8WKYRUIA X-IPAS-Result: Av8CAPjm7VHRVdstlGdsb2JhbABbgztQsWaGFog5gQ4IFg4BAQEBBwsLCRIqgiQBAQQBQAEbHQEDAQsGBQQHOyIBEQEFARwZCId1AQMJBgybFIxPgn+EWAoZJw1kh3QBBQyNN4JTBxaDaAOXXYEpjj8WKYRUIA X-IronPort-AV: E=Sophos;i="4.89,723,1367964000"; d="scan'208";a="21951566" Received: from mail-oa0-f45.google.com ([209.85.219.45]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Jul 2013 04:15:28 +0200 Received: by mail-oa0-f45.google.com with SMTP id j1so9920716oag.18 for ; Mon, 22 Jul 2013 19:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xS8ZBrFc88Ac7cQP4blHt8is/o+D01X5bRL4Xoi59TA=; b=UMERRkh4J1/jGetCIJiFt2ossGuNqAzdyGFl+uqA64CnwsSYCFm3knowtfqyvMlIJO /MmXLMQDB/HoDNJT8b4TFaKjcLi3Cr1qkldvVFXmKd5dV7BbTMvEXKwFduEfk+c2nrh6 6nvPo40awv6oVQ4MuBKnNOKm2M2ZN088BKz7xVbCr/cpkFFf6Wkrgm+DZuhRvbb6kl32 OCU+81it71+TSXiJeTW163lJQnyJ7TR2vY/TeDENedxy8lpNz1RmGjhKWiKbyVbSJ56r Or/Ihxw6e7V3z8322pqBaVK4s3lQouq7bg/gpvWn3L2NbNUI4dO0d36+2eVfvlGeCgas NEuw== MIME-Version: 1.0 X-Received: by 10.60.83.116 with SMTP id p20mr28177242oey.83.1374545726787; Mon, 22 Jul 2013 19:15:26 -0700 (PDT) Received: by 10.182.153.197 with HTTP; Mon, 22 Jul 2013 19:15:26 -0700 (PDT) In-Reply-To: <20130723001624.11626.qmail@www1.g3.pair.com> References: <20130723001624.11626.qmail@www1.g3.pair.com> Date: Mon, 22 Jul 2013 22:15:26 -0400 Message-ID: From: Kristopher Micinski To: oleg@okmij.org Cc: "caml-list@inria.fr" , habet_ms@yahoo.fr Content-Type: multipart/alternative; boundary=089e0118266ac5df3d04e2245df5 Subject: Re: [Caml-list] functional or imperative feature ? --089e0118266ac5df3d04e2245df5 Content-Type: text/plain; charset=ISO-8859-1 Thanks for pointing out this exposition, Oleg. I had never thought of the connection between monads and Landin's earlier paper. However, I do remember Appel's CPS book saying something to the effect of lambda being the prototypical let, and this was further described to me by Michael Hicks when he was doing his work on monadic programming for ML: in which ML is "lifted" to the proper monad for the job. http://research.microsoft.com/apps/pubs/?id=151802 Interesting history however, your pages are quite useful! Kris On Jul 22, 2013 8:16 PM, wrote: > > > The purest way to view it is that after desugaring, sequenced > > statements turn into lambdas, which turn into (morally) binds from the > > IO monad. The observation is that when writing in ML, you are > > implicitly writing in the IO monad. > > Peter Landin has described this process already in 1965. See the exact > quotation from his paper (the ()-passing trick) in > http://okmij.org/ftp/Computation/IO-monad-history.html > (as well a few comments). That Peter Landin's paper also described > State and Writer monads, streams and delayed evaluation and even > stream fusion. > > --089e0118266ac5df3d04e2245df5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Thanks for pointing out this exposition, Oleg. =A0I had= never thought of the connection between monads and Landin's earlier pa= per. =A0However, I do remember Appel's CPS book saying something to the= effect of lambda being the prototypical let, and this was further describe= d to me by Michael Hicks when he was doing his work on monadic programming = for ML: in which ML is "lifted" to the proper monad for the job.<= /p>

http://= research.microsoft.com/apps/pubs/?id=3D151802

Interesting his= tory however, your pages are quite useful!


Kris

On Jul 22, 2013 8:16 PM, <oleg@okmij.org> wrote:

> The purest way to view it is that after desugaring, sequenced
> statements turn into lambdas, which turn into (morally) binds from the=
> IO monad. =A0The observation is that when writing in ML, you are
> implicitly writing in the IO monad.

Peter Landin has described this process already in 1965. See the exact
quotation from his paper (the ()-passing trick) in
=A0 =A0 =A0 =A0 http://okmij.org/ftp/Computation/IO-monad-history= .html
(as well a few comments). That Peter Landin's paper also described
State and Writer monads, streams and delayed evaluation and even
stream fusion.

--089e0118266ac5df3d04e2245df5--