2 Functional thinking in action
In this chapter
- See examples of functional thinking applied to real problems.
- Understand why stratified design can help organize your software.
- Learn how actions can be visualized in timelines.
- See how timelines help you discover and resolve problems having to do with timing.
This chapter will give a broad overview of the two big ideas we will address in this book. Your main goal should be to get a taste of thinking with FP. Don’t worry about understanding everything right away. Remember that each of these ideas will be addressed in several chapters later on. This will be a whirlwind tour of functional thinking in action.
Welcome to Toni’s Pizza
Welcome to Toni’s Pizza. The year is 2118. It turns out people still like pizza in the future. But all of the pizza is made by robots. And the robots are programmed in JavaScript. Go figure.
Toni has applied a lot of functional thinking to the code that runs her restaurants. We’re going to take a brief tour through some of her systems, including the kitchen and her inventory, and see how she has applied the two levels of functional thinking.
Just so you don’t have to flip back, here are the two levels again. Here’s how Toni uses them.