Created
February 12, 2017 20:47
-
-
Save erikolsson/755bd33a7a6606884c8c7515d99e4050 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
import Foundation | |
import RxSwift | |
extension ObservableType where E == Bool { | |
func negate() -> Observable<Bool> { | |
return map(!) | |
} | |
} | |
/* | |
Example: | |
Observable.of(true) | |
.negate() <- false | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment