Search code examples
iosswiftreactive-programmingrx-swiftreactivex

What does the >- operator mean in RxSwift and where is it documented?


I've seen the >- operator in various code fragments involving RxSwift (e.g. https://github.com/ReactiveX/RxSwift/issues/35), but can't find any documentation on it. What does it mean?

Here's an example:

combineLatest(emailIsValid, passwordIsValid)
    >- and
    >- signupButton.rx_subscribeEnabledTo
    >- disposeBag.addDisposable

Solution

  • The >- operator is called the "pipe-forward operator" and it was removed in this commit in favor of protocol extensions, once they were possible in Swift.

    It was just the best way to do it at that moment, given Swift's abilities.