I don't know why this won't work. I'm trying to automatically generate a list of numbers up to a limit "upTo" but it doesn't work.
I suspect it will be something obvious like "num" not being an array. I've tried this and it hasn't worked.
func tTables(set1 : [Int], upTo: Int) -> [Int] {
var array = set1
ForEach(1 ..< upTo + 1){num in
array.append(num)
}
return array
}
Please be descriptive as I'm only a beginner.