title: Why doesn't Seq.groupBy work like I think it will with lists? (F#)
body: <p>Here's a sample code:</p>
  
  <pre><code>let x = [5, 6, 65, 2, 3];
  let p = x.Head;
  let y = Seq.groupBy (fun xx -&gt; if xx &lt; p then -1 elif xx &gt; p then 1 else 0) x
  printfn "%A" y
  </code></pre>
  
  <p>I expected it would output </p>
  
  <pre><code>[(0, [5]), (1, [6, 65]), (-1, [2, 3])]
  </code></pre>
  
  <p>But actually it outputs</p>
  
  <pre><code>seq [(0, seq [(5, 6, 65, 2, 3)])]
  </code></pre>
  
  <p>What am I misunderstanding?</p>