/\\\ ---\\\--------- ----\\\-------- ----/\\\------- Common Music 2.6.0 ---/--\\\------ --/----\\\----- / \\\/ ? 2 2 ? 5 5 ? pi 3.141592653589793D0 ? (+ 2 3) 5 ? (+ 2 pi) 5.141592653589793D0 ? (+ 2 3 4 5 6 7 8 9) 44 ? (* 2 3) 6 ? (/ 3 2) 3/2 ? (/ 3.0 2) 1.5 ? (+ 2 (* 3 5)) 17 ? (* 2 (+ 3 5)) 16 ? (- 3 5) -2 ? (- 3 5 7) -9 ? (/ 3 5 7) 3/35 ? pi 3.141592653589793D0 ? (define three 3) ? three 3 ? (definte two 2) > Error in process listener(4): Unbound variable: TWO > While executing: CCL::CHEAP-EVAL-IN-ENVIRONMENT > Type :GO to continue, :POP to abort. > If continued: Retry getting the value of TWO. Type :? for other options. 1 > :pop ? (define two 2) ? (/ three two) 3/2 ? Three 3 ? tWo 2 ? (define tWo 4) ? tWo 4 ? two 4 ? two-pi 6.283185307179586D0 ? half-pi > Error in process listener(4): Unbound variable: HALF-PI > While executing: "Unknown" > Type :GO to continue, :POP to abort. > If continued: Retry getting the value of HALF-PI. Type :? for other options. 1 > :pop ? (define half-pi (/ pi 2)) ? half-pi 1.5707963267948966D0 ? pi/2 > Error in process listener(4): Unbound variable: PI/2 > While executing: "Unknown" > Type :GO to continue, :POP to abort. > If continued: Retry getting the value of PI/2. Type :? for other options. 1 > :pop ? (+ 4/5 3/5) 7/5 ? (define half-pi nil) ? half-pi NIL ? (+ 2 half-pi) > Error in process listener(4): value NIL is not of the expected type NUMBER. > While executing: CCL::+-2 > Type :POP to abort. Type :? for other options. 1 > :pop ? (define (plus x y) (+ x y)) ? (plus 2 3) 5 ? (plus 3 4) 7 ? (plus 3 4 5) > Error in process listener(4): Too many arguments in function call: 3 provided, at most 2 accepted. > While executing: PLUS > Type :POP to abort. Type :? for other options. 1 > :pop ? (define (square x) (* x x)) ? (square 4) 16 ? (square 16) 256 ? (define (sum-of-squares x y) (+ (square x) (square y))) ? (sum-of-squares 3 4) 25 ? (abs -3) 3 ? ? (absolute-value 3) 3 ? (absolute-value -3) 3 ? (> 3 0) T ? (< 3 0) NIL ? ? (absolute-value-2 -3) 3 ? (absolute-value-2 3) 3 ? ? (fibonacci 0) 0 ? (fibonacci 1) 1 ? (fibonacci 2) 1 ? (fibonacci 3) 2 ? (fibonacci 4) 3 ? (fibonacci 5) 5 ? ? (fibonacci 6) 8 ? (fibonacci -7) NIL ? ? (fibonacci -8) 21 ? (list 1 2 3 4) (1 2 3 4) ? (define test-list (list 1 2 3 4)) ? test-list (1 2 3 4) ? (car test-list) 1 ? (cdr test-list) (2 3 4) ? (car (cdr test-list)) 2 ? (cdr (cdr test-list)) (3 4) ? (cdr (cdr (cdr (cdr test-list)))) NIL ? (cons 0 test-list) (0 1 2 3 4) ? test-list (1 2 3 4) ? (define test-list (cons 0 test-list)) ? test-list (0 1 2 3 4) ? (cadr test-list) 1 ? (cdadr test-list) > Error in process listener(4): value 1 is not of the expected type LIST. > While executing: CDADR > Type :POP to abort. Type :? for other options. 1 > :pop ? (list (list 0 1 2 3) (list 4 5 6 7)) ((0 1 2 3) (4 5 6 7)) ? (cons 0 (cons 1 (cons 2 nil))) (0 1 2) ? (cons 1 2) (1 . 2) ? ? (fibonacci-list 15) (610 377 233 144 89 55 34 21 13 8 5 3 2 1 1) ? (reverse (fibonacci-list 15)) (1 1 2 3 5 8 13 21 34 55 89 144 233 377 610) ? (reverse test-list) (4 3 2 1 0) ? (fibonacci-list 0) NIL ?