caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe TROESTLER <Christophe.Troestler+ocaml@umh.ac.be>
To: dawid.toton@uj.edu.pl
Cc: OCaml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] 'Nondeterministic' evaluation wrt exceptions
Date: Fri, 25 Jul 2008 22:10:43 +0200 (CEST)	[thread overview]
Message-ID: <20080725.221043.29685968146908433.Christophe.Troestler+ocaml@umh.ac.be> (raw)
In-Reply-To: <488A2988.3070402@uj.edu.pl>

On Fri, 25 Jul 2008 20:29:12 +0100, Dawid Toton wrote:
> 
> Let me show an example of what I exactly mean. I start with a code:
> 
> 1: let a = heavy 1
> 2: let b = heavy 2
> 3: let c = report (a + b)
> 4: let d = heavy 4
> 5: let e = heavy d
> 
> Then I want to translate it automatically so that three applications of
> heavy are evaluated (lines 1, 2, 4). The addition a + b won't be
> evaluated untill a and b are successfully returned. (...)

You may want to have a look to
http://enfranchisedmind.com/blog/2007/08/06/a-monad-tutorial-for-ocaml/
especially the "Russian Nesting Doll Monads" section for ideas.

Regards,
ChriS


  reply	other threads:[~2008-07-25 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-25 15:29 Dawid Toton
2008-07-25 15:46 ` [Caml-list] " Gabriel Kerneis
2008-07-25 16:20 ` Xavier Leroy
2008-07-25 19:29   ` Dawid Toton
2008-07-25 20:10     ` Christophe TROESTLER [this message]
2008-07-25 20:31     ` Zheng Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080725.221043.29685968146908433.Christophe.Troestler+ocaml@umh.ac.be \
    --to=christophe.troestler+ocaml@umh.ac.be \
    --cc=caml-list@yquem.inria.fr \
    --cc=dawid.toton@uj.edu.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).