-
-
Save vincent-pradeilles/4acd7fbcbdd17734c8bcc149a28fc8ca to your computer and use it in GitHub Desktop.
This file contains 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
func fromAsync<T, U>(_ asyncRequest: @escaping (T, @escaping (U) -> Void) -> Void) -> (T) -> Observable<U> { | |
return { (a: T) in fromAsync(curry(asyncRequest)(a)) } | |
} | |
func fromAsync<T, U, V>(_ asyncRequest: @escaping (T, U, @escaping (V) -> Void) -> Void) -> (T, U) -> Observable<V> { | |
return { (a: T, b: U) in fromAsync(curry(asyncRequest)(a)(b)) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment