Skip to Content
Functional Programming in Java
book

Functional Programming in Java

by Pierre-Yves Saumont
January 2017
Intermediate to advanced
472 pages
14h 42m
English
Manning Publications
Content preview from Functional Programming in Java

Chapter 12. Handling state mutation in a functional way

This chapter covers

  • Creating a functional random number generator
  • Designing a generic API for handling state mutation
  • Handling and composing state operations
  • Using recursive state operations
  • Generic state handling
  • Building a state machine

In this chapter, you’ll learn how to handle state in a purely functional way. In the previous chapters, state mutation was avoided as much as possible, and you might have come to believe that state mutation is incompatible with functional programming. This isn’t true. In functional programming, it’s perfectly possible to handle state mutation. The only difference from what you may be used to is that you have to handle state mutation functionally, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in Java

Functional Programming in Java

Venkat Subramaniam
Learning Java Functional Programming

Learning Java Functional Programming

Richard M Reese, Richard M. Reese

Publisher Resources

ISBN: 9781617292736Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link