I'm trying to understand the relations between pair, cons, dotted tuples and proper list in PLT-Scheme 372. The detailed context of my question is as follows:
After reading some textbook and doing trial-and-error, I have got the following understanding and intuitive ideas (I may be wrong...):
all lists are pairs, e.g.:
(pair? (list 'a 'b 'c)) => #t
all conses are pairs, e.g.:
(pair? (cons 'a (cons 'b 'c))) => #t
some dot-separated tuples are pairs, e.g.:
(pair? '(a . b)) => #t
(pair? '(a . b . c)) => #t
in Standard R5RS it's not legal syntax.
Then I bumped into this problem: Why does '(a . b . c) evaluate to (b a c)? Where can I find a complete usage manual of dot?
'(a . b) => (a . b)
'(a . b . c) => (b a c)
'(a . b . c . d) => illegal use of `.'
'(cons 'a (cons 'b 'c)) => (a b . c)