Chapter 7

In This Chapter

**Considering the problem that lambda expressions solve**

**Writing your first lambda expression**

**Using lambda expressions in real-world programming**

The previous chapters in this book focus on the Unified Modeling Language (UML) and how you use it to better model applications. Chapter 6 moves on to design patterns, which actually help you implement a model. This chapter takes the process one step further by looking at *lambda expressions *— an elegant method of turning a model into a math expression. Let’s say that you need to calculate the number of widgets produced in an hour before you can print out the value. Adding the equation directly to the existing code might look bulky, but adding it as a separate function makes the code hard to read. Lambda expressions provide a middle ground where you can define the calculation in an easy-to-read manner without creating a separate function.

Start Free Trial

No credit card required