Let\'s say I am solving a particular problem and come up with a function
let function parameter1 ... =
a lot of adding, multiplying & so on with a
One way to do it is combining inline keyword and generic bits from LanguagePrimitives module:
let inline greatFunction param1 param2 =
let one = LanguagePrimitives.GenericOne
let two = one + one
(param1+one)/(param2*two)
// Usage
let f1 = greatFunction 4 2
let f2 = greatFunction 4L 2L
let f3 = greatFunction 4I 2I