Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnSundell/4d08c465b81f78345c9f1bdef6406176 to your computer and use it in GitHub Desktop.
Save JohnSundell/4d08c465b81f78345c9f1bdef6406176 to your computer and use it in GitHub Desktop.
class ViewController: UIViewController {
private let loadModel: ((Result<MyModel>) -> Void) -> Void
init<T: ModelLoading>(modelLoader: T) where T.Model == MyModel {
loadModel = modelLoader.load
super.init(nibName: nil, bundle: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment