Created
May 25, 2020 18:39
-
-
Save opsb/0081ce0a211b3f88e6510eafa4ba2198 to your computer and use it in GitHub Desktop.
Map operation on a protocol in swift
This file contains hidden or 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
public protocol Notifier { | |
associatedtype Event | |
init() | |
func send(_ : Event) -> Void | |
func map<ChildNotifier, ChildEvent>(_ : (Event) -> (ChildEvent)) -> ChildNotifier where ChildNotifier : Notifier, ChildNotifier.Event == ChildEvent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment