How do I check for reference equality in F#? : <p>F# uses structural equality for the <code>=</code> operator, which is almost always what you want:</p>

<pre><code>let a = [1; 2; 3]
let b = [1; 2; 3]
printfn "%A" (a = b)  // Prints "true"
</code></pre>

<p>But in some algorithms, it can be important to be able to ask "Are these two things <em>the same object</em>?" This can help with detecting cycles in a graph, for example. So how do I ask for reference equality in F#? I.e., how do I write the <code>isSameObject</code> function below?</p>

<pre><code>let isSameObject x y = ???
let a = [1; 2; 3]
let b = [1; 2; 3]
let a' = a
printfn "%A" (isSameObject a b)  // Prints "false"
printfn "%A" (isSameObject a a')  // Prints "true"
</code></pre>
