Version franaise
Home About Download Resources Contact us

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Recursion on
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-12-10 (08:24)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: Recursion on
> Maybe I was looking in the wrong place, but I haven't found "the second case
> of the semantics of E.switch" on your website. In fact, the way I learned
> about React.E.switch was from the .mli-style webpage on your website, and by
> trial and error.

Here :

Second bullet.

> One thing that really troubles me, is that I do not understand why define
> returns a couple of two identical element. And the typing of E.fix is rather
> confusing:
>> val fix : ('a React.event -> 'a React.event * 'b) -> 'b

Yes it's confusing. It's here to allow to define mutually recursive
definitions and still expose them to the outside world. It is also
usefull if you have other values that depend on the delayed value and
you want to expose them to the outside world. There are example of
this in the example.

[snip] I tried to rexeplain E.fix and S.fix but I came up with what's
written in their documentation sorry.