caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] pattern matching on integer intervals
@ 2012-01-21 18:14 Pierre Chopin
  2012-01-21 18:30 ` Till Varoquaux
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pierre Chopin @ 2012-01-21 18:14 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 670 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-21 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-21 18:14 [Caml-list] pattern matching on integer intervals Pierre Chopin
2012-01-21 18:30 ` Till Varoquaux
2012-01-21 18:33 ` Gabriel Scherer
2012-01-21 19:46 ` Edgar Friendly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).