title: Ocaml - global vs local variable
body: <p>I wanted to create a global variable called result that uses 5 string concatenations to create a string containing 9 times the string start, separated by commas.
  I have two pieces of code, only the second one declares a global variable.
  For some reason it's not registering easily in my brain... Is it just that i used a let in so result in the first piece of code is a local variable? Is there a more detailed explanation for this?</p>
  
  <pre><code>let start = "ab";;
  
  let result = start ^ "," in
    let result = result ^ result in
    let result = result ^ result in
    let result = result ^ result in
    let result = result ^ start in 
    result;;
  - : string = "ab,ab,ab,ab,ab,ab,ab,ab,ab"
  
  let result = 
    let result = start ^ "," in
    let result = result ^ result in
    let result = result ^ result in
    let result = result ^ result in
    let result = result ^ start in 
    result;;
  val result : string = "ab,ab,ab,ab,ab,ab,ab,ab,ab"
  </code></pre>