O'Reilly logo

Real-World Functional Programming with Examples in F# and C# by Jon Skeet, Tomas Petricek

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 8. Designing behavior-centric programs

This chapter covers

  • Representing behaviors as functions
  • Extending program behavior
  • Working with functions and closures
  • Testing clients using decision trees

In chapter 7, we discussed data-centric applications, and you learned that the first step to designing functional programs is to define the relevant data structures. There are also cases where the data structure contains some form of behavior. One case might be a command that the user can invoke or tasks that the program executes at some point. Instead of hard-coding every behavioral feature, we want to work with them uniformly, so we need to keep them in a data structure that can be easily modified, either before the compilation or at runtime. ...

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