Foreach parallel adaptor for the multicore package