Chapter 5. Data handling with lists

This chapter covers

  • Classifying data structures in functional programming
  • Using the ubiquitous singly linked list
  • Understanding the importance of immutability
  • Handling lists with recursion and functions

Data structures are among the most important concepts in programming, as well as in everyday life. The world as we see it is itself a huge data structure composed of simpler data structures, which are in turn composed of simpler structures. Each time we try to model something, be it objects or facts, we end up with data structures.

There are many types of data structures. In computing, data structures are generally represented as a whole by the term collections. A collection is a group of data items ...

Get Functional Programming in Java 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.