ch2_1_defun
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ch2_1_defun [2022/03/31 04:56] – admin | ch2_1_defun [2022/03/31 04:57] (current) – admin | ||
---|---|---|---|
Line 20: | Line 20: | ||
=== 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.1648724187.txt.gz · Last modified: 2022/03/31 04:56 by admin