My first F# day. If I have this:
let cat = Animal()
Now how do I check at later stage if cat is Animal
cat
is
Animal
For demonstration only (don't define an is function):
let is<'T> (x: obj) = x :? 'T type Animal() = class end type Cat() = inherit Animal() let cat = Cat() cat |> is //true