1 Functional programming
Object-oriented, process-oriented, functional programming
Focus on function, pay attention to the transfer of function result
Functions can be assigned, or other values can be accepted
2 Functional Programming features
1. function is a one-class citizen
As with other variables, they can be assigned and assigned, and can be passed as arguments
2. Use an expression without a statement
An expression is a simple operation that always has a return value, and the statement performs some operation without a return value. That is, each step of the operation to be simple, have a definite result.
Functional programming is generated for operations, not IO
3. No side effects
Try not to use global content or modify system variables
4. Referencing transparency
Function run result changes due to parameters, not changes due to system state change
5 Meaning:
Improved efficiency, full use of function encapsulation features
Close to natural language, easy to understand
Easy Concurrent Programming
Python Learning note 011--functional programming