3 ms·
No. In my example the function is created only once, and called twice.
by ScottBurson 14y ago
No. In my example the function is created only once, and called twice.
- anthonyb 14y agoWhat's that lambda thingo in the middle then? Pretty sure that's another function, redefined every time your function is called.
- Tyr42 14y agoYes, the lambda creates the function. Note that defvar does not. So there is still only one function being defined here.
- anthonyb 14y agoOk, I see now. You've still got that &optional argument though. I don't see a huge amount of difference from a semantic point of view between that and the Python version though (ie. if x == None: ...).