Browse thread
Strange matching-problem... ?!
-
Oliver Bandel
- Frederic van der Plancke
- Ville-Pertti Keinonen
[
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: | Ville-Pertti Keinonen <will@e...> |
| Subject: | Re: [Caml-list] Strange matching-problem... ?! |
On Thu, 2005-01-27 at 13:20 +0100, Oliver Bandel wrote: > # match Foo with > _Foo -> "foo" > |Bar -> "bar";; > Warning: this match case is unused. > - : string = "foo" Here, you're matching the value Foo against a catch-all pattern with a variable called _Foo. This is equivalent to writing: match <anything> with x -> "foo" | <anything> -> "bar" The first case matches any value.