I had never really thought about whether a symbol could be a number in Lisp, so I played around with it today:
> \'1
1
> (+ \'1 \'1)
2
> (+ \'1 1)
2
>
As has been pointed out, there is no difference, as numbers evaluate to themselves. You can confirm this by using eval
:
(eval 1) ;=> 1
This is not limited to numbers, by the way. In fact, in Common Lisp, most things evaluate to themselves. It's just that it's very rare for something other than numbers, strings, symbols, and lists to be evaluated. For instance, the following works:
(eval (make-hash-table)) ;equivalent to just (make-hash-table)