0

I am attempting to perform a simple mapping from one array into another.

It works perfectly in the playground, but fails in Xcode.

import UIKit

class ViewController: UIViewController, UITableViewDelegate {
    let multiplicand = [1,2,3]
    var multiplier: Int = 3
    var product = multiplicand.map({$0 * multiplier})

The error message is on the last line

'ViewController Type' does not have a member named 'multiplicand'

Swift 2.0

Xcode 7 beta 3

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
petegrif
  • 69
  • 1
  • 11

0 Answers0