Talk is cheap, show me some code
In the next screenshot, you will see a simple print statement (Hello World
). This statement is executed in the interactive environment by highlighting the statement (you do not need to highlight [<EntryPoint>]
) and then pressing Alt + Enter. You will see the output of the command in the FSI window as shown in the following screenshot:
You can also run the program from the context menu by selecting the code to execute and right-clicking in the code window to launch the context menu, followed by selecting the Execute in Interactive option. The following screenshot shows the context menu:
F# interactive provides a large set of features that we will use throughout this book. If you are interested in knowing more about FSI, please refer to the FSI Reference on MSDN at http://msdn.microsoft.com/en-us/library/dd233175.aspx.
Now that we have run our first program, let's do some Math. is The F# let
statement is used to bind an identifier, which can be a value...