Last active
October 16, 2017 01:01
-
-
Save luks91/b04adee0021b84cabef5c51d977c3766 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
class Flowables private constructor(){ | |
companion object { | |
inline fun <T, S> generateWith(noinline initialState: () -> S, crossinline generator: (S, Emitter<T>) -> S) | |
= Flowable.generate(Callable<S>(initialState), BiFunction<S, Emitter<T>, S> { a, b -> generator.invoke(a, b) }) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment