Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Implemented `Publisher.values` and `.errors`.
extension Publisher where Output: EventConvertible {
func values() -> Publishers.CompactMap<Self, Output.Output> {
compactMap(\.event.value)
}
func errors() -> Publishers.CompactMap<Self, Output.Failure> {
compactMap(\.event.error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment