Browse thread
'Nondeterministic' evaluation wrt exceptions
-
Dawid Toton
- Gabriel Kerneis
-
Xavier Leroy
-
Dawid Toton
- Christophe TROESTLER
- Zheng Li
-
Dawid Toton
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe TROESTLER <Christophe.Troestler+ocaml@u...> |
| Subject: | Re: [Caml-list] 'Nondeterministic' evaluation wrt exceptions |
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