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:
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
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
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
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
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