Does it reorder? I would expect these two to be equivalent > > let x = f (g 1) (h ()) in > > and > > let f2 = f (g 1) in > let x = f (h ()) in > > and in the second case the order is clearly g before h. > It depends on the order of evaluation. I forgot to specify that I was taking right to left here (the order of evaluation is unspecified in Ocaml, if I remember correctly). > If the order is indeed to evaluate the last argument first then > > let t1 = h () in > let t2 = g 1 in > let x = f t2 t1 in > let y = t2 in > x + y > > It's not hard to preserve the order whatever it may be. > Yes, it is what I meant by "monadic form". To sum up, I'd say exceptions have some interesting properties, but are quite far from pure function as far as optimisation opportunities are concerned.