Hi Henrik,

> I was under the impression that (;) is a shortcut for (get), however

That's right.


> when I try (; Lst Nth) I get NIL but not with (get Lst Nth).

The difference between 'get' and ';' is that the former evaluates all
its arguments, while the latter evaluates only the first one.


So (get Lst Nth) evaluates 'Lst', and then tries to assoc 'Nth' with the
result. The following works

   : (; '((a . 1) (Nth . 2) (c . 3)) Nth)
   -> 2

which is equivalent to

   : (get '((a . 1) (Nth . 2) (c . 3)) 'Nth)
   -> 2

Also

   : (; '(a b c) 2)
   -> b

works, but not

   : (let Nth 2 (; '(a b c) Nth))
   -> NIL

instead of

   : (let Nth 2 (get '(a b c) Nth))
   -> b

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to