3 ms·
"Sometimes (f x) is [one of 6 things]" I don't mean to be the next snarky Lisp guy in the room, but I don't see the difference between reading (if (= a 3)
by jfm3 16y ago
"Sometimes (f x) is [one of 6 things]"
I don't mean to be the next snarky Lisp guy in the room, but I don't see the difference between reading
(if (= a 3) ...)
and thinking "that's a special form and a predicate", and reading
if a == 3:
...
and thinking "that's a special form and a predicate". In either case there's "if". Writing "(f x) could be anything" is a straw man. As soon as you replace "f" with "if" the argument falls apart.
(No, you can't name a function "if" in Common Lisp. Go ahead, try it.)
- Jach 16y agoAh, but you can in Scheme. :) guile> (define if (lambda (. args) (display "Haha!") (newline))) guile> (if (= 3 4) 't 'f) Haha!
- jfm3 16y agoCute! And you're right! Scheme should be kept away from people who are prone to hurt themselves, as well as nail clippers and letter openers. Too dangerous! :)