I am writing a method in Kotlin:
fun fetchDepositSession(): Completable =
Observable.fromIterable(session.accounts)
.map(DepositSession::DepositAccount)
.toList()
.doOnSuccess(depositSession::depositAccounts::set)
.flatMapObservable(Observable::fromIterable)
.map(DepositSession.DepositAccount::account::get)
.toCompletable()
The line .flatMapObservable(Observable::fromIterable)
is causing an error: