Writing less code with higher-order functions
One of the main tasks every programmer should master is dealing with data. Our apps receive data from a source, be it a web service or some local database, and then we transform that data into user interfaces where we can collect more information and then send it back to the source. There is even an acronym for this – Create, Read, Update, and Delete (CRUD).
Throughout your life as a programmer, you will spend a lot of your time writing CRUD code. It doesn't matter if you are working with 3D graphics or training machine learning models – CRUD will consume a good part of your life as a developer.
Data manipulation and standard control flows are a good starting point. We can also add higher-order functions, one of the primary tools of functional programming, to help us manipulate data faster. Basically higher order functions are functions that take a function as an argument, or return a function.
Getting ready
Create a new...