O'Reilly logo

Advanced Python 3 Programming Techniques by Mark Summerfield

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 16. Functional-Style Programming

Functional-style programming is an approach to programming where computations are built up from combining functions that don’t modify their arguments and that don’t refer to or change the program’s state, and that provide their results as return values. One strong appeal of this kind of programming is that (in theory), it is much easier to develop functions in isolation and to debug functional programs. This is helped by the fact that functional programs don’t have state changes, so it is possible to reason about their functions mathematically.

Three concepts that are strongly associated with functional programming are mapping, filtering, and reducing. Mapping involves taking a function and an ...

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