// Imperative style array of maximum values per index func imperativeMaxArray(x: [Int], y: [Int]) -> [Int] { var maxima: [Int] = [] let count = min(x.count, y.count) for index in 0.. [Int] { return zip(x, y).map(max) }