3 ms·
wouldn't the data version be '(1 2 3) ? sorry I am just trying to understand
by beanjuiceII 1y ago
wouldn't the data version be '(1 2 3) ? sorry I am just trying to understand
- spauldo 1y agoYou're basically asking if literals are code. I imagine you'll get varied opinions about that. (And yes, that can be used unquoted in a few different contexts in Lisp, such as a special form or macro, or if you've managed to convince the reader that 1 is a function.)
- Xmd5a 1y agoUsually yes. To distinguish between lists and function calls. However if we are to pass code literals to eval, we need to quote them: =>(eval '(1 2 3)) Cannot call 1 as a function. =>(eval ''(1 2 3)) (1 2 3)