3 ms·
This interpreter does not understand quote or '. When you write (cdr '(ddd a xxx)) the interpreter reads ( cdr '( ddd a xxx ) ) |
by gus_massa 17y ago
This interpreter does not understand quote or '. When you write
(cdr '(ddd a xxx))
the interpreter reads
( cdr '( ddd a xxx ) )
|
\------ '( is a token
For example, this works:
(cdr (list 1 2 3))
- cabalamat 17y agoThis however does not: (cdr (list ddd a xxx)) If the language doesn't allow lists containing things other than integers, it's not really a lisp.