Currying Goroutine

Notice anything special about the generatedCars collection? (Hint: Our Goroutine is an anonymous function).

That's right. We are currying the generatedCars collection. Our Goroutine covers over the generatedCars collection. That's what enables us to reference and append to it from the Goroutine, regardless of which core it happens to be running in.

We are standing on the shoulders of giants. We're using a Go channel and Goroutines to emulate an FP generator and other HOFs. Our code is readable, and it doesn't take much code to make it all work.