Skip to content

Instantly share code, notes, and snippets.

@jasdev
Last active April 20, 2020 15:17
Show Gist options
  • Save jasdev/e9b7c099544c7513415e15e789ed2975 to your computer and use it in GitHub Desktop.
Save jasdev/e9b7c099544c7513415e15e789ed2975 to your computer and use it in GitHub Desktop.
Custom `Publisher.share` scaffolding.
import Combine
extension Publisher {
func cher() -> AnyPublisher<Output, Failure> { /// (1) `cher` to avoid
/// colliding with `share` and for now, returning `AnyPublisher`
/// until we have a fuller type in hand. My
/// [post on operator fusion](https://jasdev.me/fusion-primer) has
/// more detail on the erasure and full-type dance.
fatalError("To be implemented.")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment