This slide/topic got me thinking about parallelism in functional programming languages. This function is essentially doing a map over collection which is a very common thing in functional languages.
After further research the long story short is that functional languages are much more suited to parallelism than imperative languages. Due to the fact that functional languages have no shared state and side-effects parallelism can be trivial at times. http://stackoverflow.com/questions/12788858/parallelism-in-functional-languages
Does the foreach in this function represent the parallelization of the code or is the code parallelized at run time?