I tried to create an alias function to Flowable.flatmap() as follow, but compile error.
fun <T, R> Flowable<T>.then(mapper: Function<T, Publisher<R>>): Flowable<R> {
return flatMap(mapper)
}
The error is : One type argument expected for interface Function<out R> defined in kotlin
Have any idea? Thanks!