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

Chapter 6. Currying Favors with Your Code

The word "curry" perks me up. The heavenly aromas wafting from the kitchen, the sheer magic worked out of legendary spices, and the right dash of salt—bliss! Life starts looking up again.

Scala, too, gives us constructs to liven up programming. We have used functions till now. However, in this chapter, we take a real good and close look at how easily we can pass around functions. We also look at some basic concepts such as lexical scopes and name binding. A discussion of local functions comes next. A discussion on closures comes after it. All these basics will help you to learn about two important techniques. The first is partially applied functions, with a nice detour into the intricacies of the underscore. ...

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