FAQ Database Discussion Community


Difference between CDR, CAR and REST, FIRST and possible implementation?

list,lisp,common-lisp,cons,cdr
I'm learning a little bit about functional programming in LISP and here's what I've bumped into: LISP uses CAR, CDR functions as well as FIRST and REST functions. Both related to lists. From what I've learned so far, there's a difference between these two, but I don't quite see what...

CAR and CDR in LISP

lisp,clisp,cdr
Suppose there's a LISP list L described by ((A B) (C)) How to print the result of (CAR L) and (CDR L)? (in clisp interpreter) I am able to print these simple statements like (CAR `(A B C)) which gives A. But how do I define the list and CAR...