This is why functional programming constructs can be good for parallelism: if you use map or filter then your function only takes the entry as an input so (if you don't close over any shared mutable resources) you are guaranteed independence. See https://docs.rs/rayon/1.4.0/rayon/iter/struct.Map.html in the rust rayon crate.
This is why functional programming constructs can be good for parallelism: if you use
map
orfilter
then your function only takes the entry as an input so (if you don't close over any shared mutable resources) you are guaranteed independence. See https://docs.rs/rayon/1.4.0/rayon/iter/struct.Map.html in the rust rayon crate.