On 01/21/2012 01:14 PM, Pierre Chopin wrote:
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?

The author of Camomile wrote IMap and ISet to efficiently store maps/sets over a large domain where large ranges are the same. You may be able to use these DIET trees from camomile or from batteries to accomplish something along the lines of what you want.

E.


--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to