diff options
| author | Divay Prakash <divayprakash@users.noreply.github.com> | 2018-10-24 11:30:23 +0530 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-24 11:30:23 +0530 | 
| commit | adfd3064e52e769dc46f62d8302be7e28be4e48d (patch) | |
| tree | 204d82adc9f82ae4fe377b631a1406b97eb6b11d /fsharp.html.markdown | |
| parent | 92022da0a6ea9417521563de9e537f337c426465 (diff) | |
| parent | 8f5a67190705c9a3101653901d8f8a7b48eb1775 (diff) | |
Merge branch 'master' into MarkdownFRChanges
Diffstat (limited to 'fsharp.html.markdown')
| -rw-r--r-- | fsharp.html.markdown | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/fsharp.html.markdown b/fsharp.html.markdown index bbf477ba..59461eed 100644 --- a/fsharp.html.markdown +++ b/fsharp.html.markdown @@ -34,7 +34,7 @@ let myFloat = 3.14  let myString = "hello"           // note that no types needed  // ------ Lists ------ -let twoToFive = [2; 3; 4; 5]        // Square brackets create a list with +let twoToFive = [2; 3; 4; 5]     // Square brackets create a list with                                   // semicolon delimiters.  let oneToFive = 1 :: twoToFive   // :: creates list with new 1st element  // The result is [1; 2; 3; 4; 5] @@ -53,7 +53,8 @@ add 2 3                       // Now run the function.  // to define a multiline function, just use indents. No semicolons needed.  let evens list = -   let isEven x = x % 2 = 0     // Define "isEven" as a sub function +   let isEven x = x % 2 = 0   // Define "isEven" as a sub function. Note +                              // that equality operator is single char "=".     List.filter isEven list    // List.filter is a library function                                // with two parameters: a boolean function                                // and a list to work on @@ -306,7 +307,7 @@ module DataTypeExamples =      // ------------------------------------      // Union types (aka variants) have a set of choices -    // Only case can be valid at a time. +    // Only one case can be valid at a time.      // ------------------------------------      // Use "type" with bar/pipe to define a union type | 
