3 ms·
Then there's Common Lisp, where a variable is assigned only the first time it's defined, while a parameter is assigned every time its definition form is evaluat
by zeveb 10y ago
Then there's Common Lisp, where a variable is assigned only the first time it's defined, while a parameter is assigned every time its definition form is evaluated: http://clhs.lisp.se/Body/m_defpar.htm http://clhs.lisp.se/Body/m_defpar.htm.
- junke 10y agoThe meaning of parameters and arguments in the context of functions, which is what this post is about, are defined as usual[1]: > argument n. 1. (of a function) an object which is offered as data to the function when it is called. > parameter n. 1. (of a function) a variable in the definition of a function which takes on the value of a corresponding argument (or of a list of corresponding arguments) to that function when it is called, or which in some cases is given a default value because there is no corresponding argument. What you describe are the two possible ways of defining special variables, which are more like program parameters. [1] http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_p.htm#parameter http://www.lispworks.com/documentation/HyperSpec/Body/26_glo..., http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_a.htm#argument http://www.lispworks.com/documentation/HyperSpec/Body/26_glo...