Open
Description
Would there be an interest in having something along the lines of the below in the project? It's just an extension for converting List<Single> to Single<List> via an extension function. There could even be a better way of doing this with Rx but I'm yet to find one. Obvs you could do this for types other than Single as well.
fun <T> List<Single<T>>.zipSingles(): Single<List<T>> {
if (this.isEmpty()) return Single.just(emptyList())
return Single.zip(this) {
@Suppress("UNCHECKED_CAST")
return@zip (it as Array<T>).toList()
}
}
Metadata
Metadata
Assignees
Labels
No labels