title: F# function running without being called
body: <p>This code</p>
  
  <pre><code>open System.Threading
  
  let duration = 1000
  
  module SequentialExample =
      let private someTask item =
          printfn "oh god why"
          Thread.Sleep(duration)
          item + " was computed"
  
      let private items = [
          "foo"
          "bar"
          "baz"
      ]
  
      let getComputedItems = 
          printfn "heh"
          [for item in items -&gt; someTask item]
          |&gt; Array.ofList
  
  module ParallelExample =
      let private someTask item =
          printfn "that's ok"
          Thread.Sleep(duration)
          item + " was computed"
  
      let private items = [
          "foo"
          "bar"
          "baz"
      ]
  
      let getComputedItems = 
          Async.Parallel [for item in items -&gt; async { return someTask item }]
          |&gt; Async.RunSynchronously
  
  [&lt;EntryPoint&gt;]
  let main args =
      ParallelExample.getComputedItems |&gt; ignore
      0
  </code></pre>
  
  <p>Has the following output:</p>
  
  <pre><code>heh
  oh god why
  oh god why
  oh god why
  that's ok
  that's ok
  that's ok
  </code></pre>
  
  <p>If I'm calling <code>ParallelExample</code> module, why is F# running the code in <code>SequentialExample</code> module?</p>
  
  <p>What am I doing wrong?</p>