title: F# equivalent of the C# typeof(IEnumerable<>)
body: <p>I have a piece of code where I need to figure out if a given type implements <code>IEnumerable&lt;T&gt;</code> (I don't care about the T)</p>
  
  <p>I've tried (<code>t:System.Type</code> in case you wonder)</p>
  
  <pre><code>let interfaces = t.GetInterfaces()
  let enumerbale = 
      interfaces.Any(fun t -&gt; 
          t.GetGenericTypeDefinition() = typeof&lt;IEnumerable&lt;&gt;&gt;
      ) 
  </code></pre>
  
  <p>however that won't compile (the compile doesn't like the &lt;>). I then tried</p>
  
  <pre><code>let interfaces = t.GetInterfaces()
  let enumerbale = 
      interfaces.Any(fun t -&gt; 
          t.GetGenericTypeDefinition() = typeof&lt;IEnumerable&lt;'a&gt;&gt;
      )
  </code></pre>
  
  <p>but get's a warning that 'a is constraint to obj. I Don't want to figure out if <code>IEnumerable&lt;obj&gt;</code> is implemented but <code>IEnumerabl&lt;&gt;</code>.</p>
  
  <p>Any one know's the solution and btw feel free to comment on the code above as well.</p>