Created
June 22, 2019 19:44
-
-
Save Arrlindii/9f03914e93d253c6e6e95c91b115fa5a to your computer and use it in GitHub Desktop.
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
| let germanCities = PassthroughSubject<String, Never>() | |
| let italianCities = PassthroughSubject<String, Never>() | |
| let europianCities = Publishers.Merge(germanCities, italianCities) | |
| _ = europianCities.sink(receiveValue: { city in | |
| print("\(city) is a city in europe") | |
| }) | |
| germanCities.send("Munich") | |
| germanCities.send("Berlin") | |
| italianCities.send("Milano") | |
| italianCities.send("Rome") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment