O'Reilly logo

Scala Functional Programming Patterns by Atul S. Khot

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The chain of responsibility

We looked at the command design pattern in Chapter 1, Grokking the Functional Way. There, the sender and executor are decoupled. Taking the idea further, we could have a pipeline of command objects that are linked together in a list. As in command, the sender submits a request. However, the request could be handled by any of the command objects in the pipeline.

We talked of moms and their kids and of kids and their mums. So the dads of the world united and started feeling left out. No worries, there is a place under the Sun for dads too! Dads have big responsibilities of dealing with stuff, in a world-wise fashion. In a family, thus, we have roles and responsibilities. Dads are used to fix broken things around the house, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required