Skip to content

Instantly share code, notes, and snippets.

@marcpalmer
Created April 27, 2018 16:16
Show Gist options
  • Save marcpalmer/c053b51b3727b141be5c65592ac2daec to your computer and use it in GitHub Desktop.
Save marcpalmer/c053b51b3727b141be5c65592ac2daec to your computer and use it in GitHub Desktop.
Flint conditional conformance blog part 2
public struct StaticActionBinding<FeatureType, ActionType>: CustomDebugStringConvertible
where FeatureType: FeatureDefinition, ActionType: Action {
public func perform(using presenter: ActionType.PresenterType,
with input: ActionType.InputType,
completion: ((ActionOutcome) -> ())? = nil) {
}
}
let action: StaticActionBinding<SomeFeature, SomeAction> = …
action.perform(using: myPresenter, with: "Hello world!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment