Summary
We can conclude our chapter; let's go through what we have learned. We started learning about looping constructs in Scala. We discussed native looping constructs such as for
,while
, and do while
loops. After that, we saw for
expressions, along with for yield
expressions. Then we understood alternatives to iteration, that is, recursion. We wrote a few recursive functions as well. Finally, we looked at if else
conditional statements and pattern matching. We know there's much more to come, but with these concepts we're on our way to understanding Scala language constructs better. We'll continue doing that in our next chapter. There we'll take a look at the core of functional programming: functions. We will see how functions are defined and used. It'll show the variety of functional constructs we have available in Scala. We'll try to give meaning to our programs using functions.