Does F# do TCO (tail call optimization) with |> Option.bind
<p>Here is my function:</p>

<pre><code>let rec applyAll rules expr =
  rules
  |&gt; List.fold (fun state rule -&gt;
    match state with
    | Some e -&gt;
      match applyRule rule e with
      | Some newE -&gt; Some newE
      | None -&gt; Some e
    | None -&gt; applyRule rule expr) None
  |&gt; Option.bind (applyAll rules)
</code></pre>

<p>It takes a set of rules and applies them until the input expression is reduced as far as possible.  I could rewrite the <code>Option.bind</code> to be a <code>match</code> expression and it would clearly take advantage of tail call optimization.  However, this is more elegant to me, so I would like to keep it as is unless it will be consuming stack unnecessarily.  Does F# do TCO with this code?</p>

<p>EDIT: This code always returns None; I'll be fixing that, but I think the question still makes sense.</p>