Type Inference in F#

The compiler can deduce the type of a value or function at compile time. Type Inference is not guaranteed to work for all cases. It is therefore possible to set the types explicitly.

Type Inference in F#
Code Snippet
// Inferred Types
let someInt = 1
// int
let add a b = a + b
// int -> int -> int
// Explicit Types
let float : float = 10
// float
let addFloat (a: float) (b: float) = a + b
// float -> float -> float