From: Alexandre Pilkiewicz <alexandre.pilkiewicz@polytechnique.org>
To: Edgar Friendly <thelema314@gmail.com>
Cc: Lukasz Stafiniak <lukstafi@gmail.com>, Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] Tuples (covariant immutable arrays)
Date: Wed, 14 Mar 2012 18:18:03 -0400 [thread overview]
Message-ID: <CAH2fdNYnBnWGnyMMjQ2kg4tSYOmU51ZTQvx_dBQ=2926fPU_wQ@mail.gmail.com> (raw)
In-Reply-To: <CAL-jcAmWU=u=cmSrKbmwTEZbD1LkY48u0rexr=2Pd_f+wBRgSA@mail.gmail.com>
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
prev parent reply other threads:[~2012-03-14 22:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 20:38 Lukasz Stafiniak
2012-03-14 21:03 ` Edgar Friendly
2012-03-14 21:12 ` Lukasz Stafiniak
2012-03-14 21:26 ` Edgar Friendly
2012-03-14 22:18 ` Alexandre Pilkiewicz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH2fdNYnBnWGnyMMjQ2kg4tSYOmU51ZTQvx_dBQ=2926fPU_wQ@mail.gmail.com' \
--to=alexandre.pilkiewicz@polytechnique.org \
--cc=caml-list@inria.fr \
--cc=lukstafi@gmail.com \
--cc=thelema314@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox