Sorry miss the Cc-ing to the caml list.
When I read the balancing function of stdlib's Set/Map several years ago, I thought I have understand how it works. But now, I read it again and I'm less confident now. Could someone answer my questions?Is this code right? If r is Empty and lr and ll are huge trees,
doesn't it create a massively unbalanced tree?
Another question is that why OCaml implementation allows
a balancing factor up to *2*, which is usually allowed only up to 1?
Maybe my question is naive one, but I would appreciate if your could comment it.