equality - Unexpected results with OCaml != -
What can I say, = and! = OCaml is supposed to work on strings. I'm seeing strange results, though I want to understand better.
When I compare two stars = I get it, then I hope the result will be:
# "steve" = "steve" ;; -: bool = true # "Steve" = "line" ;; -: bool = false But when I try! = I do not:
# "steve"! = "Rowe" ;; -: bool = true # "Steve"! = "Steve" ;; (* Unexpected - should not it be wrong? *) -: bool = true Can someone explain? Is there a better way to do this?
! = is not = Disclaimer & lt; & Gt; is a disapproval of = that you should use:
# "Steve" ! = == is rejected, and if you are starting an orcham, then you should not use any of them yet. They can be a little tricky, and they are officially underspecified (only guarantee that if there are two values == they are = ).
Comments
Post a Comment