title: Indexing into array of functions: Expression resolves to an unused l-value
body: <p>I am trying to index into an array of functions but I get the error: "Expression resolves to an unused l-value".  I have tried to google what this means but information is scarce and what I find seems unrelated.  Does anyone know what I am doing wrong here?  Any help would be much appreciated ! Thank you.</p>
  
  <pre><code> override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      var cell:UITableViewCell = myTableView.dequeueReusableCellWithIdentifier("cell") as UITableViewCell
      var chart =  cell.contentView.viewWithTag(42) as TKChart
      chart.delegate = self
      chart.removeAllData(); //needed because of cell recycling
  
      var userDef1 = 1
      var userDef2 = 1
  
      func lineChart() -&gt; TKChart {...}
      func columnChart() -&gt; TKChart {...}
  
      var chartsArray = [AnyObject]()
  
  
      if userDef1 == 1{
          chartsArray.append(lineChart())
      }
  
  
      if userDef2 == 1{
          chartsArray.append(columnChart())
      }
  
  
       if indexPath.row == 0{
          chartsArray[0]  **error: Expression resolves to an unused l-value**
      }
  
  
      if indexPath.row == 1{
          chartsArray[1]   **error: Expression resolves to an unused l-value**
      }
  
      return cell
  }
  </code></pre>