Test blog post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested in Swift 3 | |
mutating func appendN(element: Element, n: Int) { | |
guard n > 0 else { | |
return | |
} | |
for _ in 0..<n { | |
self.append(element) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// Data persistence errors | |
public let DataPersistenceErrorDomain = "com.tomdiggle.datapersistence.error" | |
class DataPersistence { | |
// MARK: Saving Data | |
/** |