Created
March 31, 2019 18:02
-
-
Save polac24/67f05b5d9b076552c28a7a679ec552cd to your computer and use it in GitHub Desktop.
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
protocol Database { | |
func addUser<T>(user: T) -> Bool | |
} | |
class DatabaseStub<User>: Database { | |
lazy var addUserAction: (T) -> Bool | |
func addUser<T>(user: T) -> Bool { | |
return addUserAction(user as! User) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment