Observable.combineLatest type inference in kotlin
I'm using RxJava2, Kotlin-1.1 along with RxBindings in my project. I have simple login screen with 'login' button disabled by default, I want to enable the button only when username and password edittext fields are not empty. LoginActivity.java Observable<Boolean> isFormEnabled = Observable.combineLatest(mUserNameObservable, mPasswordObservable, (userName, password) -> userName.length() > 0 && password.length() > 0) .distinctUntilChanged(); I'm unable to translate the above code from Java to Kotlin: LoginActivity.kt class LoginActivity : AppCompatActivity() { val disposable =