Note: This article is adapted from my book Functional and Concurrent Programming: Core concepts and Features, published by Addison-Wesley. See, in particular, Chapter 26 on Functional Concurrent…