4 ms·
First of all, that will go into an infinite recursive loop and blow your stack. Second, why would you call the upvote function here? The name suggests that it'
by sketerpot 17y ago
First of all, that will go into an infinite recursive loop and blow your stack.
Second, why would you call the upvote function here? The name suggests that it's a pure function that returns a boolean, but for some reason you've introduced side effects. Naughty, naughty!
Third, you seem to be using Common Lisp, but you're using Scheme's naming convention for predicates. In Common Lisp, you would name it should-upvote-p, for consistency with everybody else's code.
(I've been grading papers all morning for an introductory programming class, so this post was a reflex.)
- jriddycuz 17y agoAw, c'mon man, it was a joke. I know it wouldn't run...I was trying to express the ambiguity of the recursive irony, or something. I would never put side effects in a real predicate if I were really writing this. But I would still name the function whatever the hell I want because it's Lisp and I can. ;)