match case unused

"Roelof Wobben [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
 I have to rewrite a not function with pattern matching.
 
So I did this : 
 
let not x = 
   match x with 
     x -> false
     | _ -> true ;;
 
but now I see this warning : Warning 11: this match case is unused.
 
Which is correct because on output both not true and not false gives the output true.
Which I find wierd.
 
not true 
match true with 
  true -> false 
 
So the expected output is false 
 
Can someone explain to me where my thinking took the wrong turn ?
 
Roelof
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.