title: Array in Haskell
body: <p>How is an array created in haskell using the constructor array? I mean, does it create the first element and so on? In that case how does it read the associated list?</p>
  
  <p>For example if we consider the following two programs:-</p>
  
  <pre><code>ar :: Int-&gt;(Array Int Int)
  ar n = array (0,(n-1)) (((n-1),1):[(i,((ar n)!(i+1))) | i&lt;-[0..(n-2)]])
  
  ar :: Int-&gt;(Array Int Int)
  ar n = array (0,(n-1)) ((0,1):[(i,((ar n)!(i-1))) | i&lt;-[1..(n-1)]])
  </code></pre>
  
  <p>Will these two have different time complexity?</p>