Post-generics functional programming libraries
Functional programming libraries have seen a rise in popularity since the advent of generics in Go. No longer is it necessary to mess with the empty interface or to rely on code generation to build out the staples that make up functional programming languages. We’ll explore a few libraries in this section and see how their implementation compares. In doing so, we will stick with examples that are more or less identical but might show off some different functions from the ones we have seen so far in this book.
Pie with generics
The first library that we will look at is Pie. In the previous section, we indicated that there are two versions of Pie available today: v1, which is tailored to Go before the introduction of generics, and v2, which offers the same functionality in terms of functions but leverages generics to do so. v2 is actively maintained, so I expect that over time v1 and v2 will no longer offer feature parity. That...