title: How to return a list of elements in Elm
body: <p>I'm trying to build a list of elements from a simple array in ELM. The expected result is literally just a list of elements with 1 as the first item, 2 as the second, and so on.</p>
  
  <pre><code>import Html exposing (..)
  import Html.Attributes exposing (class, id)
  import List exposing (map)
  
  theArray = [1,2,3,4,5,6]
  
  createListItem item =
    li [] [ text (toString item)]
  
  buildList collection =
    map createListItem collection
  
  builtList = ul [] [(buildList theArray)]
  
  main = 
    builtList
  </code></pre>
  
  <p>But I keep getting the compiler error on line thirteen. I've tried type annotating the map element to html but I don't see what I should do.</p>
  
  <pre><code>The 2nd argument to function `ul` is causing a mismatch.
  
   *13| builtList = ul [] [(buildList theArray)]*
  
  Function `ul` is expecting the 2nd argument to be:
  
      List VirtualDom.Node
  
  But it is:
  
      List (List Html)
  </code></pre>