Jump to content

Twelve statements: Difference between revisions

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, indices(self)))
let result = [(Element, Int)](zip(self, self.indices))
// let result = [(Element, Int)](zip(indices,self.indices))
 
return result
}
}
Line 3,359 ⟶ 3,352:
value /= 2
}
//let result = binaryRepresentation.pad(element: 0, times: length-binaryRepresentation.count, toThe: .Right).reverse()
let result = binaryRepresentation.pad(element: 0, times: length-binaryRepresentation.count, toThe: .Right)
return result
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.