Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Pattern matching missing (or brain damage?)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oleg <oleg_inconnu@m...>
Subject: Re: [Caml-list] Pattern matching missing (or brain damage?)
On Thursday 18 July 2002 06:36 pm, Michael Vanier wrote:
> # match a with
>      A(_) | B(_) | C(_) -> "foo"
>   |  C(_) | D(_) | E(_) -> "bar";;
> - : string = "foo"
>
> You put in an extra | before the A(_).

It's optional

Regards,
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners