The Example 1 for F# has a small problem:
CODE:
let GiveMeTheLength(input) =
// this is a 1-line comment
let result = input.Length
(* this is a multi-line comment *)
result
While F# do provide you with type inference, .Length method is not available for non-restrain generic type input
Proper one:
let GiveMeTheLength(input:string) =
// this is a 1-line comment
let result = input.Length
(* this is a multi-line comment *)
result
The Example 1 for F# has a small problem:
CODE:
While F# do provide you with type inference,
.Lengthmethod is not available for non-restrain generic typeinputProper one: