Browse thread
Snd question
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Martin Jambon <martin_jambon@e...> |
| Subject: | Re: [Caml-list] Snd question |
On Wed, 17 Aug 2005, Alain Frisch wrote:
> Richard Jones wrote:
>> On Tue, Aug 16, 2005 at 05:34:38PM +0100, Jon Harrop wrote:
>>
>>> Currently, you cannot match [|1; ...|] in OCaml.
>>
>>
>> Yes! Or, "prefix" ^ str.
>
> This seems like a good place to insert a shameless plug. Thank you. In
> OCamlDuce (the extension of OCaml with XML types and patterns), you can
> indeed match on string prefixes:
[...]
This is also something that is relatively easy with Micmatch:
$ micmatch
Objective Caml version 3.08.3
Camlp4 Parsing version 3.08.3
# let / "prefix" (_* as str) / = "prefixabcd";;
val str : string = "abcd"
Martin
--
Martin Jambon, PhD
http://martin.jambon.free.fr