If I have this:
val a = Array(...)
and I write
a.par.map(e => someFunc(e))
Will the resulting collection be in the same order as the non-parallel collection?
Yes, but the function itself is executed without any particular order.
List(1,2,3).par foreach print // could print out 213
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With