anchor.diff:          elif a < b then greatestCommonFactor a (b - a)
           else greatestCommonFactor (a - b) b
   
  -    /// Computes the sum of a list of integers using recursion.
  +    /// Thsi example shows a recursive function that computes the sum of a list of integers.
       let rec sumList xs =
           match xs with
           | []    -> 0
           | y::ys -> y + sumList ys
   
  -    /// Make the function tail recursive, using a helper function with a result accumulator
  -    let rec private sumListTailRecHelper accumulator xs =
  -        match xs with
  -        | []    -> accumulator
  -        | y::ys -> sumListTailRecHelper (accumulator+y) ys
  -
  -    let sumListTailRecursive xs = sumListTailRecHelper 0 xs
  -
  -
  -
  -// ---------------------------------------------------------------
  -//         Record types
  -// ---------------------------------------------------------------
  -
  +
  +/// A record is a collection of data items brought together into one object.
   module RecordTypes = 
   
  -    // define a record type
  +    /// This example shows how to define a new record type.  
       type ContactCard = 
  -        { Name     : string;
  -          Phone    : string;
  +        { Name     : string
  +          Phone    : string
             Verified : bool }
                 
  -    let contact1 = { Name = "Alf" ; Phone = "(206) 555-0157" ; Verified = false }
  -
  -    // create a new record that is a copy of contact1, 
  -    // but has different values for the 'Phone' and 'Verified' fields
  -    let contact2 = { contact1 with Phone = "(206) 555-0112"; Verified = true }
  -
  -    /// Converts a 'ContactCard' object to a string
  -    let showCard c = 
  +    /// This example shows how to define an instance of a record type.
  +    let contact1 = 
  +        { Name = "Alf" 
  +          Phone = "(206) 555-0157" 
  +          Verified = false }
  +
  +    /// This example shows how to use "copy-and-update" on record values. It creates 
  +    /// a new record value that is a copy of contact1, but has different values for 
  +    /// the 'Phone' and 'Verified' fields
  +    let contact2 = 
  +        { contact1 with 
  +            Phone = "(206) 555-0112"
  +            Verified = true }
  +
  +    /// This example shows how to write a function that processes a record value.
  +    /// It converts a 'ContactCard' object to a string.
  +    let showCard (c: ContactCard) = 
           c.Name + " Phone: " + c.Phone + (if not c.Verified then " (unverified)" else "")
           
   
   
  -// ---------------------------------------------------------------
  -//         Union types
  -// ---------------------------------------------------------------
  -
  +/// Union types represent different possibilites for kinds of data.
   module UnionTypes = 
   
  -    /// Represents the suit of a playing card
  +    /// For example, the following represents the suit of a playing card.
       type Suit = 
           | Hearts 
           | Clubs 
           | Diamonds 
           | Spades
   
  -    /// Represents the rank of a playing card
  +    /// A union type can also be used to represent the rank of a playing card.
       type Rank = 
           /// Represents the rank of cards 2 .. 10
           | Value of int
  
positive.code:               yield Queen
                yield King ]
                                     
      type Card =  { Suit: Suit; Rank: Rank }
                
      /// Returns a list representing all the cards in the deck
      let fullDeck = 
          [ for suit in [ Hearts; Diamonds; Clubs; Spades] do
                for rank in Rank.GetAllRanks() do 
                    yield { Suit=suit; Rank=rank } ]
  
      /// Converts a 'Card' object to a string
      let showCard c = 
          let rankString = 
              match c.Rank with 
              | Ace -> "Ace"
  
negative.code: //
  // For more about F#, see:
  //     http://fsharp.org
  //     https://docs.microsoft.com/en-us/dotnet/articles/fsharp/
  //
  // To learn more about applied F# programming, use
  //     http://fsharp.org/guides/enterprise/
  //     http://fsharp.org/guides/cloud/
  //     http://fsharp.org/guides/web/
  //     http://fsharp.org/guides/data-science/
  //
  // To install the Visual F# Power Tools, use
  //     'Tools' --> 'Extensions and Updates' --> `Online` and search
  //
  // For additional templates to use with F#, see the 'Online Templates' in Visual Studio, 
  //     'New Project' --> 'Online Templates'
  
  
  // Open namespaces using 'open'
  open System
  
  
  /// First some basics on integers and numbers
  module IntegersAndNumbers = 
  
      /// This is a sample integer.
      let sampleInteger = 176
  
      /// This is a sample floating point number.
      let sampleDouble = 4.1
  
      /// This computed a new number by some arithmetic.  Numeric types are converted using
      /// functions 'int', 'double' and so on.
      let sampleInteger2 = (sampleInteger/4 + 5 - 7) * 4 + int sampleDouble
  
      /// This is a list of the numbers from 0 to 99.
      let sampleNumbers = [ 0 .. 99 ]
  
      /// This is a list of all tuples containing all the numbers from 0 to 99 and their squares.
      let sampleTableOfSquares = [ for i in 0 .. 99 -> (i, i*i) ]
  
      // The next line prints a list that includes tuples, using %A for generic printing
      printfn "The table of squares from 0 to 99 is:\n%A" sampleTableOfSquares
  
  
  /// Much of F# programming consists of defining functions that transform input data to produce
  /// useful resutls.
  module BasicFunctions = 
  
      /// You use 'let' to define a function that accepts an integer argument and returns an integer. 
      /// Parentheses are optional for function arguments,
      let sampleFunction1 x = x*x + 3
  
      /// Apply the function, naming the function return result using 'let'. 
      /// The variable type is inferred from the function return type.
      let result1 = sampleFunction1 4573
      printfn "The result of squaring the integer 4573 and adding 3 is %d" result1
  
      /// When needed, annotate the type of a parameter name using '(argument:type)'
      let sampleFunction2 (x:int) = 2*x*x - x/5 + 3
  
      let result2 = sampleFunction2 (7 + 4)
      printfn "The result of applying the 1st sample function to (7 + 4) is %d" result2
  
      /// Conditionals use if/then/elid/elif/else.
      ///
      /// Note that F# uses whitespace indentation-aware syntax like Python.
      let sampleFunction3 x = 
          if x < 100.0 then 
              2.0*x*x - x/5.0 + 3.0
          else 
              2.0*x*x + x/5.0 - 37.0
  
      let result3 = sampleFunction3 (6.5 + 4.5)
      printfn "The result of applying the 2nd sample function to (6.5 + 4.5) is %f" result3
  
  
  
  /// Strings and booleans are fundamental data types in F# programming.
  module StringManipulation = 
  
      /// Booleans use 'true', 'false', 'not', '&&' and '||'
      let boolean1 = true
      let boolean2 = false
  
  