On 24 November 2010 21:37, Alain Frisch <alain.fri...@lexifi.com> wrote:
> Being able to write things like:
>
> lazy let rec button1 =
>  button ~click:(fun () -> button2 # disable) "Button1"
> and button2 =
>  button ~click:(fun () -> button1 # disable) "Button2"
> in
> ...
>
>
> As the lazy keyword suggests, we rely on lazy evaluation to evaluate such
> recursive definitions. The code above is equivalent to:
>
> let rec button1 =
>  lazy (button ~click:(fun () -> (Lazy.force button2) # disable) "Button1")
> and button2 =
>  lazy (button ~click:(fun () -> (Lazy.force button1) # disable) "Button2"
> in
> ...

This sounds very much like the presentation of value recursion in Don
Syme's ML 2005 paper:

   http://research.microsoft.com/apps/pubs/default.aspx?id=79951

Out of interest, is your extension based on Don's work?

_______________________________________________
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