I. Function
1. as an expression or parameter, all results are obtained only when the call is the last expression or parameter. The rest can only obtain the first result (when the function does not return a value, the first result is nil)
1) expression:... = F1 (), F2 (), F3 ()
2) parameters: F (F1 (), F2 (), F3 ())
F (F1 () .. F2 () .. F3 ())
Obtain the first result of F1 () and F2 (), all the results of F3 ()
2. the constructor collects all parameters of the expression,
The {F1 (), F2 (), F3 ()} constructor contains the first result of F1, F2, and all the results of F3.
3. When enclosed in parentheses, only the first result is always obtained.
F (F3 () returns only the first result of F3.
4. Unpack: the input is an array, and the output is all elements in the array.
Unpack {10, 20, 30}
5. variable parameters
The number of variable parameters of select ('#',...)
Select (I,...) Variable Parameter I
6. function: First value, lexical Scope
7. High-Order Function: contain function argument;
Programming in Lua