Petite Chez Scheme Version 9.5.4
Copyright 1984-2020 Cisco Systems, Inc.

> (define a '(3 4 5))
> (cdr a)
(4 5)
> (cddr a)
(5)
> (cdddr a)
()
> a
(3 4 5)
> (cdddr a)
()
> (cddddr a)
Exception in cddddr: incorrect list structure (3 4 5)
> (cdddddr a)
Exception: variable cdddddr is not bound
> (define b (cons 2 a))
> b
(2 3 4 5)
> a
(3 4 5)
> (define c (cons a b))
> c
((3 4 5) 2 3 4 5)
> (define c (list a b))
> c
((3 4 5) (2 3 4 5))
> (define c (append a b))
> c
(3 4 5 2 3 4 5)
> (define f '((a (b (c))) d))
> (caadr f) ; want the answer to be b.
Exception in caadr: incorrect list structure ((a (b (...))) d)
> (cadar f)
(b (c))
> (caadar f)
b
> /
#<procedure />
> (define / *)
> (/ 4 5)
20
> (max 3 5 7 2)
7
> (max 4)
4
> (max)
Exception: incorrect argument count in call (max)
> a
(3 4 5)
> (max a)
Exception in max: (3 4 5) is not a real number
> (apply max a)
5
> (max 3 4 5)
5
> (if 0 1 2)
1
> (if '() 1 2)
1
> (if (< (car a) 2) 4 5)
5
> (if (< (car a) 2) 4)
> (list (if (< (car a) 2) 4))
(#<void>)
> (void)
> (if (void) 2 3)
2
> (if car 4 5)
4
> (define letter->number
    (lambda (let)
      (if (eq? let 'A)
	  4.0
	  (if (eq? let 'B+)
	      3.5
	      3.0))))
> (letter->number 'B+)
3.0
> (define letter->number
    (lambda (let)
      (if (eq? let 'A)
	  4.0
	  (if (eq? let 'B+)
	      3.5
	      3.0))))
> (letter->number 'B+)
3.5
>