Interview :: F#
51) What is the purpose of 'begin' keyword?
It is used to signify the starting of a code block.
52) What is the purpose of 'elif' keyword?
It is used same as else if branching.
53) What is the purpose of 'yield' keyword?
Yield keyword finds its use in the sequence expressions to produce a sequence value.
54) What is the purpose of 'rec' keyword?
It is used to indicate a recursive function.
55) What is the purpose of 'extern' keyword?
It is used to indicate that the program element declared is defined in some other assembly or binary.
56) Write the syntax for declaration of discriminated unions.
57) 'Variables in F# are immutable' Explain.
It means, once the value is assigned to a variable it cannot be altered.
58) What is the use of 'raise' function?
It is used for the indication of error occurrence.
59) What is lazy computation in F#?
Lazy computation is a feature of F#. Lazy computation does not evaluate immediately. It is executed when the result is needed.
Example
60) What is XML documentation in F#?
In F#, you can produce documentation from triple-slash (///) code comments. XML comments can precede declarations in code files (.fs) or signature (.fsi) files.