Use break or continue statement with pmap

Your post (in combination with @jacobadenbaum’s) reads a bit like it would abort the computation (like break). So for the clarity of anyone reading this in the future: The return does not stop the computation and is identical to what @jacobadenbaum posted, i.e. it acts as a continue. The reason is that do defines an anonymous function and thus the return only returns from that anonymous function and does not exit the surrounding block somehow.

1 Like