My first F# day. If I have this:
let cat = Animal()
Now how do I check at later stage if cat
is
Animal
I know I'm late. If you try to test the type of a collection in fsi with :? it will give an error, if the item types do not match. E.g.
let squares = seq { for x in 1 .. 15 -> x * x }
squares :? list ;; // will give false
squares :? list ;; // error FS0193: Type constraint mismatch
Wrapping in a function like Daniels is<'T> works.