(* F# can infer the type of parameters for you. At times you'd have to
specifiy the type, for most part, it can infer. Inference is based on the
usage pattern.
*)

//Here a and b are inferred as int (even though + is available on other types)
let add a b = a + b

printfn "%d" (add 2 4)

//Here something is inferred as string since you used %s
let printSomeThing something = printfn "%s" something

printSomeThing "Hello world!"

//here somethingelse is inferred as Double
let printSomeThingElse somethingelse = printfn "%g" somethingelse

//printSomeThingElse "Hello World!" // ERROR

printSomeThingElse 2.2

//Here someOtherThing is inferred as 'a for generic type
let printSomeOtherThing someOtherThing = printfn "%s" (someOtherThing.ToString())

printSomeOtherThing 2
printSomeOtherThing 2.2
printSomeOtherThing "Hello"

//Here we specified the type explicitly, even though it is not necessary
let printIntValue (number : int) = printfn "%d" number