|
|
|
|
|
by carlmr
2580 days ago
|
|
You mostly don't need types in F#, although types often add readability, especially for function signatures (IMHO). F# will even compile let add a b = a + b
add 1 2;;
as val add : a:int -> b:int -> int
val it : int = 3
or let add a b = a + b
add 1ul 2ul;;
as val add : a:uint32 -> b:uint32 -> uint32
val it : uint32 = 3u
So it will even infer type from the first usage of the function. |
|