Petite Chez Scheme Version 8.4
Copyright (c) 1985-2011 Cadence Research Systems
> (+ 5 3)
8
> (define a '(3 4 5))
> (cdr a)
(4 5)
> (cadr a)
4
> (cddr a)
(5)
> (cdddr a)
()
> (cddddr a)
Exception in cddddr: incorrect list structure (3 4 5)
Type (debug) to enter the debugger.
> (cdddddr a)
Exception: variable cdddddr is not bound
Type (debug) to enter the debugger.
> (define b (cons 2 a))
> b
(2 3 4 5)
> a
(3 4 5)
> (/ 3 5)
3/5
> /
#
> (define / (lambda (x y) (* x (+ y 3))))
> (/ 3 5)
24
> (max 3 6 (+ (car a) 8) 4)
11
> (max a)
Exception in max: (3 4 5) is not a real number
Type (debug) to enter the debugger.
> (apply max a)
5
> (void)
> (list (void))
(#)
> (if 3 4 5)
4
> (if 0 4 5)
4
> (if '() 4 5)
4
> (if (< 6 3) 4 5)
5
> (if #f 4 5)
5
> (load "C:/SVN/304/www/Live-in-class/day01-section02.ss")
> letter-to-number
#
> (letter-to-number 'B+)
3.5
> (letter-to-number 'T)
0
>