6

Three Common Categories of Functions

In the preceding chapters, we have looked at some of the core components of functional programming. We have discussed how to write functions that adhere to both functional programming and pure functional programming.

In this chapter, we are going to look at some practical implementations of functions that leverage these concepts. These are the categories and topics we will cover:

  • The first category we will look at is predicate-based functions
  • Then, we will take a look at data transformation functions, which maintain the structure of our data (more on that later)
  • Finally, we will take a look at functions, which transform the data and reduce the information into a single value

This is not meant to be an ...

Get Functional Programming in Go now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.