What You've Learned

In this chapter, we discussed functional programming. Along the way, you learned the following:

  • Programs written in the functional style always give the same result when they are given the same values in their arguments.

  • Functional programs do not contain side effects. Their whole purpose in life is to just calculate a value to return.

  • Programs that are not functional usually read like a cookbook, with statements like, “First do this, and then do that.” This style of programming is called imperative programming.

  • A good strategy for writing Lisp programs is to break them into a clean, functional part and a dirty, imperative part.

  • Functional programs can be written quickly, are more compact, and tend to have fewer bugs, particularly ...

Get Land of Lisp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.