chickadee » scheme » cdr

cdr pairprocedure

Returns the contents of the cdr field of pair. Note that it is an error to take the cdr of the empty list.

(cdr '((a) b c d))              ===>  (b c d)
(cdr '(1 . 2))                  ===>  2
(cdr '())                       ===>  error
(cdr (cons 1 2))                ===>  2

(import (chicken base))
(cdr (weak-cons 1 2))           ===>  2