title: Expert F# web crawler example
body: <p>I'm trying to work through an example in <em>Expert F#</em>, which is based on <strong>v1.9.2</strong>, but the CTP releases after that have changed enough that some of them don't even compile anymore.</p>
  
  <p>I'm running into some trouble with listing 13-13.  Here's the snippet of the <code>urlCollector</code> object definition:</p>
  
  <pre><code>let urlCollector =
      MailboxProcessor.Start(fun self -&gt;
          let rec waitForUrl (visited : Set&lt;string&gt;) =
              async { if visited.Count &lt; limit then
                          let! url = self.Receive()
                          if not (visited.Contains(url)) then
                              do! Async.Start
                                  (async { let! links = collectLinks url
                                           for link in links do
                                           do self &lt;-- link })
  
                          return! waitForUrl(visited.Add(url)) }
  
              waitForUrl(Set.Empty))
  </code></pre>
  
  <p>I'm compiling with Version <strong>1.9.6.16</strong>, and the compiler complains thusly:</p>
  
  <ol>
  <li>incomplete structured construct at or before this point in
  expression  [after the last paren]</li>
  <li>error in the return expression for this 'let'. Possible incorrect indentation  [refers to the let defining <code>waitForUrl</code>]</li>
  </ol>
  
  <p>Can anyone spot what's going wrong here?</p>