Anonymous user
Twelve statements: Difference between revisions
→{{header|Swift Playground}}
Line 3,297:
import UIKit
import Foundation
internal enum PaddingOption {
case Left
Line 3,318 ⟶ 3,317:
if n <= 0 {
return []
}
return Array(self[0..<Swift.min(n, self.count)])
}
Line 3,329 ⟶ 3,327:
return []
}
return Array(self[n..<self.count])
}
Line 3,342 ⟶ 3,339:
func zipWithIndex() -> Array<(Element, Int)> {
let result = [(Element, Int)](zip(self, self.indices))
return result
}
}
Line 3,359 ⟶ 3,352:
value /= 2
}
return result
}
|