title: .NET list of F# functions
body: <p>I am trying to create a .NET list of F# functions, but it keeps telling me that it expects a something something, but has a 'a instead. I'm not sure, but I'm guessing it's because I can't create a .NET list of F# functions. Is this true?</p>
  
  <p>For example, when I try:</p>
  
  <pre><code>let listOfFunctions = new List&lt;int -&gt; unit&gt;()
  </code></pre>
  
  <p>The compiler complains accordingly:</p>
  
  <p><code>No constructors are available for the type 'List&lt;(int -&gt; unit)&gt;'</code></p>
  
  <p>EDIT</p>
  
  <p>After much thought, I realized, I forgot to open System.Collections.Generic, which caused the issue. I didn't notice the issue because the compiler thought it was an F# list, which doesn't have a constructor like .NET Lists do. However, it's confusing because the type signatures look the same. Consider the following code:</p>
  
  <pre><code>let FSharpList : List&lt;int&gt; = [1;2;3]
  let DotNetList : List&lt;int&gt; = new List&lt;int&gt;()
  </code></pre>
  
  <p>If you don't use open System.Collections.Generic, the compiler assumes List to be an F# list, and the second line will obviously fail. But if you include it, then the compiler will assume List is a .NET list, and the first line will complain that [1;2;3] is supposed to have type <code>List&lt;int&gt;</code> but instead has type <code>'a list</code> (aka it's expecting a .NET list).</p>
  
  <p>So actually, it had nothing to do with a list of functions at all. In fact, the following code:</p>
  
  <pre><code>open System.Collections.Generic
  let myList = new List&lt;int -&gt; unit&gt;()
  </code></pre>
  
  <p>works just fine.</p>