Re: [Caml-list] Tuples (covariant immutable arrays)

2012-03-14 Thread Alexandre Pilkiewicz
type +'a t = (int - 'a) * int let get (a: 'a t) i = (fst a) i let length (a: 'a t) = snd a let of_array (a: 'a array) : 'a t = let a' = Array.copy a in (Array.get a', Array.length a') should be enough -- Caml-list mailing list. Subscription management and archives:

Re: [Caml-list] Examples where let rec is undesirable

2012-01-02 Thread Alexandre Pilkiewicz
Hi Diego. I think one of the best reason to *not* have let rec as the default is shadowing. Say you have a function that expect a string as an argument let foo s = and you realize that it's the job of the callee and not the caller to check that the string is escaped. You can just

Re: [Caml-list] Re: New experimental ARM backend [was: OCaml maintenance status / community fork (again)]

2011-12-18 Thread Alexandre Pilkiewicz
Hi Benedikt On Sun, Dec 18, 2011 at 1:08 PM, Benedikt Meurer benedikt.meu...@googlemail.com wrote: [1] https://github.com/downloads/bmeurer/ocaml-arm/ocaml-arm-3.12.1+20111218-benchmark.pdf Could you by any chance give the execution time (one should be enough since we have the ratio) and

Re: [Caml-list] OCaml maintenance status / community fork

2011-12-06 Thread Alexandre Pilkiewicz
Hi all, I will not jump in the how to save OCaml from dying because nothing moves discussion. But just in the nothing moves discussion. On Tue, Dec 6, 2011 at 2:52 PM, ivan chollet ivan.chol...@gmail.com wrote: The current status of OCaml is more than stable enough to serve its goals, which

Re: [Caml-list] Include question

2011-11-08 Thread Alexandre Pilkiewicz
On Tue, Nov 8, 2011 at 10:10 AM, Gabriel Scherer gabriel.sche...@gmail.com wrote: If you want some module of your system to be parametrized by another module (to be able to pass either a concrete module or a mockup module), you should use a functor. And if you don't want to pollute your entire

Re: [Caml-list] Priority queues

2011-06-30 Thread Alexandre Pilkiewicz
I have the impression that none of the proposed solution allows to increase/reduce the priority of an element, which is necessary for the Dijkstra. (But I don't know any that does) - Alexandre 2011/6/30 Michael Ekstrand mich...@elehack.net: On 06/30/2011 07:33 AM, Jean-Christophe Filliātre