A function is a wrapper built into Python, and we can break up complex tasks into simple tasks by splitting large pieces of code into functions and using a layer of function calls, which can be called process-oriented
The design of the sequence. function is the basic unit of process-oriented program design .
and functional programming (note that more than one "type" word)--functional programming, although it can also be attributed to the process-oriented programming, but the idea is closer to the mathematical calculation.
We first have to understand the concepts of computer (computer) and computational (Compute).
At the level of the computer, the CPU executes the subtraction instruction code, as well as various conditional judgments and jump instructions, so, assembly language is the most close to the computer languages.
And the calculation of the exponential meaning, the more abstract calculation, the farther away from the computer hardware.
corresponding to the programming language, is:1> The lower the language, the more close to the computer, low degree of abstraction, implementation efficiency, such as C language;
2> The more advanced the language, the more close to the calculation, high degree of abstraction, inefficient execution, such as Lisp language.
Functional programming is a very high degree of abstraction of the programming paradigm, pure Functional programming language is written in a function without variables , so any function, as long as the input is determined, the output is OK, this pure function we call no
Side effects. In the case of programming languages that allow the use of variables, because of the variable state inside the function, the same input may get different output, so this function has side effects.
One of the features of functional programming is that it allows the function itself to be passed as a parameter to another function, and also allows a function to be returned!
Python provides partial support for functional programming. Because Python allows the use of variables,Python is not a purely functional programming language
Functional programming of Python