On Fri, 23 Oct 2009 00:34:29 +0200, Stéphane Glondu <st...@glondu.net>
wrote:
> Mathias Kende a écrit :
>>      let rec g = f g
> 
> What about:
> 
>   let rec g x = f g x

This will compile, but then I also want to write :
        let rec h = t (f h)
(with t : ('a -> 'b) -> 'a -> 'b) but here, I can't afford to use
        let rec h x = t (f h) x
because t as some side effects and I need it to be evaluated only once.

Any idea on how to do that ?

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to