Ref list of functions

By writing the type of the elements of the list.

And you cannot have a non-empty list with an element of type 'c for all type 'c, because this type has no inhabitant. In other words, a real value cannot be simultaneously an int and a float and a string and etc.

Similarly, without playing tricks, the only functions with type 'a -> bool, for any 'a, are fun _ -> true and fun _ -> false.

1 Like