From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0LIED8V013531 for ; Sat, 21 Jan 2012 19:14:13 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoBAEP/Gk/RVdQ2kGdsb2JhbABCngYBkAkIIgEBAQEJCQ0HFAQhgWkFHQITcAEHXRIBBQEWHwgahSaCK5gpgl8KnDiJCoMcBIg7jF2OET2EHQ X-IronPort-AV: E=Sophos;i="4.71,548,1320620400"; d="scan'208";a="128363277" Received: from mail-vw0-f54.google.com ([209.85.212.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Jan 2012 19:14:07 +0100 Received: by vbbey12 with SMTP id ey12so1816797vbb.27 for ; Sat, 21 Jan 2012 10:14:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.66.166 with SMTP id g6mr1289817vdt.34.1327169646470; Sat, 21 Jan 2012 10:14:06 -0800 (PST) Received: by 10.52.186.70 with HTTP; Sat, 21 Jan 2012 10:14:06 -0800 (PST) Date: Sat, 21 Jan 2012 13:14:06 -0500 Message-ID: From: Pierre Chopin To: caml-list@inria.fr X-Gm-Message-State: ALoCoQlzczbQcQlN4B1hOStzhRH3YaU44T/BP+d4mFvUteCw0p8lrx0M4w8V6NP1uIvZXwyvA+GR Content-Type: multipart/alternative; boundary=20cf307f309255a55704b70dc364 Subject: [Caml-list] pattern matching on integer intervals --20cf307f309255a55704b70dc364 Content-Type: text/plain; charset=ISO-8859-1 Hi, I am trying to do pattern matching on unicode characters, represented by integers. I would like to do something like that let f c = match c with 0xff .. 0xfff -> foo I know we can pattern match over char intervals but It doesn't be to be the case for char intervals. Some I have two questions: Is there a better way of doing what I am doing and why is it possible to pattern match over char intervals and not int intervals? -- Pierre Chopin, Chief Technology Officer and co-founder punchup LLC pierre@punchup.com --20cf307f309255a55704b70dc364 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I am trying to do pattern matching on unicode characters, repres= ented by integers. I would like to do something like that

=A0let f = c =3D
=A0match c with
=A0=A0 0xff .. 0xfff -> foo

I know = we can pattern match over char intervals but It doesn't be to be the ca= se for char intervals. Some I have two questions:
=A0Is there a better way of doing what I am doing and why is it possible to= pattern match over char intervals and not int intervals?

--
Pie= rre Chopin,
Chief Technology Officer and co-founder
punchup L= LC
pierre@punchup= .com

--20cf307f309255a55704b70dc364--