Chapter 2. Using functions in Java

This chapter covers

  • Understanding functions in the real world
  • Representing functions in Java
  • Using lambdas
  • Working with higher-order functions
  • Using curried functions
  • Programming with functional interfaces

To understand how functional programming works, we could use functional components provided by some functional library, or even the few that have been made available in the Java 8 library. But instead, we’ll look at how you can construct things rather than how to use these provided components. Once you’ve mastered the concepts, it will be up to you to choose between your own functions and the standard Java 8 ones, or to rely on one of the existing external libraries. In this chapter you’ll create ...

Get Functional Programming in Java: How functional techniques improve your Java programs now with O’Reilly online learning.

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