Can someone please give me a basic explanation of what the variations of car and cdr do in Scheme?
If I am correct, car will return the first item in the list. cdr will return a list excluding the first element.
I'm confused on the other variations of these, more specifically things like cadar, caddr, cddr, etc.
Say I have this as a random example:
define X '(a b (c d e))
(car X)
(cdr X)
(cadr X)
(cadar X)
(car X) would produce a, (cdr X) would produce (b (c d e)), cadr would produce b. But I don't know how to infer any other variation of car/cdr like cadar.