Inline function is a function that is expanded in line when it is called. When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call.
The F# inline function is a function that is integrated directly into the calling code. It helps to optimize code and sometimes can improve performance too.
Below is an example of inline function in F# programming language:
type InlineClass() =
member inline this.inlineFunction(a) = a*a
let obj = new InlineClass()
let result = obj.inlineFunction 2
printf "%d" result
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.