March 2018
Beginner to intermediate
458 pages
10h 34m
English
We are now going to see how to write and read in F#. To read and write into the console, we can use the following commands:
Let's compare F# with C#:
|
F# |
C# |
|
The F# user is free from the obligation of defining types; for example: let square x = x* x The compiler can identify (integer * integer) or (float * float) when we pass a value.
|
The C# user is bound to provide a type: Public int square(int x){ return x = x*x ; }
|
|
F# has immutable data, and the value never changes; for example: let number = [3;2;1] let moreNumber = 4:: number In the preceding example, to add one ... |
Read now
Unlock full access