title: Filter [Node] to [Element] with ghcjs-dom
body: <p>I am using ghcjs-dom. How can I filter the elements out of an array of nodes?</p>
  
  <pre><code>import GHCJS.DOM.Types
  
  nodesToElements :: [Node] -&gt; [Element]
  nodesToElements = ??
  </code></pre>
  
  <p>or</p>
  
  <pre><code>nodesToElements :: [Node] -&gt; IO [Element]
  nodesToElements = ??
  </code></pre>