chickadee » scheme » car

car pairprocedure

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

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

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