3 ms·
> If a function terminates in nil, what exactly did it compute? nil. The fact that you can syntactically put loops and ifs in place of expressions is what mak
by afiori 4y ago
> If a function terminates in nil, what exactly did it compute?
nil.
The fact that you can syntactically put loops and ifs in place of expressions is what makes them expressions
- FeepingCreature 4y agoLotta CPU time spent to get you that nil. One would think you could just `(defun fun () nil)`.
- afiori 4y agoThere seems to be a disagreement about what an expression is. I have the impression that you think that an expression is a way to compute a value, while I would posit that an expressions are a method of combining values. Not really an expression: a0 = 1; a1 = f(2); if (a0 < a1){ a2 = getInput(); } else { a2 = 3; } result = a0 + a1 + a2; More of an expression: result = 1 + f(2) + (a0 < a1 ? getInput() : 3);