I have a question about Swift. Here is my code:
var theArray = [1, 2, 3]
aFunction(value: 2)
func aFunction(value: Int) -> (Int, Int, Int){
var value1 = value * 2
var value2 = value * 4
var value3 = value * 8
return theArray[0] = value1
return theArray[1] = value2
return theArray[2] = value3
}
Is there a way to assign a value that comes from a function and assign it to an Array? What useful patterns exist for assigning function values to theArray?