Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
pmap extension for List
public fun <I,O> List<I>.pmap(transform: (I) -> O): List<O> {
val asyncOperations ={wrapTransorm(transform, it)}
return runBlocking { { it.await() } }
fun <I,O> wrapTransorm(transform: (I) -> O, input:I) = async(CommonPool) {transform(input)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.