Chapter 6. Processing values using higher-order functions

This chapter covers

  • Working with tuples options and lists
  • Writing higher-order functions for our types
  • Using automatic generalization in F#
  • Composing functions and partial application

In the previous chapter, we introduced the most common functional values. You’ve seen how these values can be constructed and how to work with them using pattern matching. Expressing all of the logic explicitly like this can be tedious, especially if the type has a complicated structure.

The types of values composed from one or several simpler values include tuples and options from the previous chapter, but also lists from chapter 3. In general, tuples are formed from values of several types. They ...

Get Real-World Functional Programming with Examples in F# and C# now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.