Functional Programming
Learn about the concept of functional programming in Python.
We'll cover the following...
Definition
Definitions of functional programming differ, but in general functional programming means
- Functions are objects, and they can be treated like any other value.
- Variables are single assignment. Once given a value, they are never changed.
- All functions are pure. The value returned by a function depends only on the arguments given to it, and if called again with the same arguments, it will produce the same value. This excludes any use of global variables or other external factors, such as the system clock.
Functional programming is widely regarded as an ivory-tower technique, not suitable for day-to-day programming. This is not the place to challenge that viewpoint, other than to note ...