Are there typeless expressions in F#?

Viewed 247

In C#, mostly every expression has a type, with some exceptions:

  • the null keyword
  • anonymous methods
  • lambdas

and perhaps others I'm not aware of. These make type inference impossible, for instance this is illegal:

var a = null;

F# is a language where everything is an expression: does any expression in F# not have a type? (I just typed let a = null in the interactive and it returned that a was of generic type a', but I'm not sure if that means the F# null is a generic type or typeless.)

1 Answers
Related