concept switch in category akka

This is an excerpt from Manning's book Reactive Web Applications: With Play, Akka, and Reactive Streams.
In Scala, a partial function p(x) is a function that’s defined only for some values of x. An actor’s receive method won’t be able to handle every type of message, which is why this kind of function is a good fit for this method. Partial functions are often implemented using pattern matching with case statements, wherein the value is matched against several case definitions (like a switch expression in Java).
I’ve found that what most helps people make the switch to functional programming is to practice it—to work on a project with a functional programming language such as Scala. If you’re reading this book, chances are that you’re interested in learning the tools of the trade precisely in order to work with these technologies, and I can only encourage you to try applying functional programming principles as soon as possible. In this section, I’ll give you a few pointers that may help you accelerate the switch.