ch2_1_defun
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ch2_1_defun [2022/03/31 04:54] – admin | ch2_1_defun [2022/03/31 04:57] (current) – admin | ||
---|---|---|---|
Line 19: | Line 19: | ||
If function body contains more expressions, | If function body contains more expressions, | ||
- | ====== Optional parameters ====== | + | === Optional parameters === |
Since LabLISP version 1.3, it is possible for user to define function with variable number of parameters, using a symbols ''& | Since LabLISP version 1.3, it is possible for user to define function with variable number of parameters, using a symbols ''& | ||
Line 64: | Line 63: | ||
The mandatory, optional and rest paramters can be combined. Order of the keywords ''& | The mandatory, optional and rest paramters can be combined. Order of the keywords ''& | ||
+ | |||
+ | === Lexical closure === | ||
Functions have lexical closure. In simple terms, it means that when called, the function body expressions are evaluated in the environment, | Functions have lexical closure. In simple terms, it means that when called, the function body expressions are evaluated in the environment, |
ch2_1_defun.1648724098.txt.gz · Last modified: 2022/03/31 04:54 by admin