lisp nth function does not work on cons-cell

Posted by ramkumar on Stack Overflow See other posts from Stack Overflow or by ramkumar
Published on 2010-02-04T11:35:31Z Indexed on 2010/03/08 1:49 UTC
Read the original article Hit count: 394

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about lisp

Related posts about elisp