[an error occurred while processing this directive]
What does cons do?
What do car and cdr do?
What is the value of (car (cdr (cons 1 (cons 2 (cons 3 null)))))?
Why do we need the special list null?
How could we define cons, car and cdr if Scheme did
not have them as primitives?
A list is either (1) null or (2) a pair where the second
part of the pair is a list. To define procedures on lists, we need to
handle both cases: what do we do when the list is null and what
do we do when the list is a pair.
Define length a procedure that takes a list as its operand and evaluates to the number of elements in that list.
[an error occurred while processing this directive]