How to perform multiple styles of pattern matching?
问题 Just started to play with F#. As terrible as I'm with it now, I do not to know to search for a similar thread too. This is what I'm trying to do: let test animal = if animal :? Cat //testing for type then "cat" elif animal :? Dog //testing for type then "dog" elif animal = unicorn //testing value equality then "impossible" else "who cares" Basically it involves type test pattern matching along with other conditional checks. I can get the first part (type checking) done like this: let test