lisp nth function does not work on cons-cell
- by ramkumar
How to use nth function in lisp if my my variable is combination of list and cons-cell
for eg:
(setq aa '(1 2) )
(nconc aa (+ 1 2))
this return me (1 2 . 3)
when i say (nth 1 aa) it returns 2
but when i use (nth 2 aa ) it throws error