O'Reilly logo

Scala Design Patterns by Ivan Nikolov

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 Scalaz library

Scala is a functional programming language and as such it supports design patterns based on concepts such as monoids, monads, and others. We already saw these in Chapter 10, Functional Design Patterns – The Deep Theory, and we know the rules they follow and the structure they have. We wrote everything ourselves, but a library already exists that does this for us—Scalaz (https://github.com/scalaz/scalaz). This library is used when we need purely functional data structures.

We have already encountered Scalaz in the previous chapter when we talked about lenses. In the following subsections, we will look at the library from the point of view of monoids, functors, and monads.

Monoids in Scalaz

One of the concepts we looked at in Chapter ...

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