title: Multidimensional arrays in Swift
body: <p>Edit: As Adam Washington points out, as from Beta 6, this code works as is, so the question is no longer relevant. </p>
  
  <p>I am trying to create and iterate through a two dimensional array:</p>
  
  <pre><code>var array = Array(count:NumColumns, repeatedValue:Array(count:NumRows, repeatedValue:Double()))
  
  array[0][0] = 1
  array[1][0] = 2
  array[2][0] = 3
  array[0][1] = 4
  array[1][1] = 5
  array[2][1] = 6
  array[0][2] = 7
  array[1][2] = 8
  array[2][2] = 9
  
  for column in 0...2 {
      for row in 0...2 {
          println("column: \(column) row: \(row) value:\(array[column][row])")
      }
  }
  </code></pre>
  
  <p>However, this is the output I get:</p>
  
  <pre><code>column: 0 row: 0 value:3.0
  column: 0 row: 1 value:6.0
  column: 0 row: 2 value:9.0
  column: 1 row: 0 value:3.0
  column: 1 row: 1 value:6.0
  column: 1 row: 2 value:9.0
  column: 2 row: 0 value:3.0
  column: 2 row: 1 value:6.0
  column: 2 row: 2 value:9.0
  </code></pre>
  
  <p>It looks as if the last column in the row is overwriting the other column values.</p>
  
  <p>Am I declaring it wrong?</p>
  
  <p>Edit: Perhaps a picture from the Playground would help:</p>
  
  <p><img src="https://i.stack.imgur.com/ytAiC.png" alt="Captured from Playground"></p>