$ scheme48 > ,load ex2.scm > > (square-mid 1 1 1) 1 > (square-mid 0 1 2) 1 > (square-mid 1 -1 -3) 1 > (square-mid 3 -9 -9) 81 > ,exit $
$ scheme48 > ,load ex3-cube-root.scm > (cube-root 1331) 11.0 > (cube-root 512) 8.0 > ,exit $
$ scheme48 > ,load ex4-fun.scm > (fun-rec 12) 504 > (fun-ite 12) 504 > (fun-ite 101) 4298817677507282099568640 > (fun-rec 101) ^C <----------- take too much time, so abort interrupt: keyboard interrupt [command-level-event-handler] keyboard 1> ,exit $
--prompt--> scheme48 > ,load ex6-filtered-accu.scm > > (filtered-accumulate * 1 identity 1 inc 10 odd?) 945 > (filtered-accumulate * 1 identity 1 inc 10 even?) 3840 > (prod-prime 5) ;; 1 * 2 * 3 * 4 24 > (prod-prime 6) ;; 1 * 5 5 > (prod-prime-mod 5) ;; 1 * 2 * 3 * 4 mod 5 4 > (prod-prime-mod 6) ;; 1 * 5 mod 6 5 > (prod-prime-mod 29) ;; 1 * 2 * 3 * 4 .... 28 mod 29 28 > (prod-prime-mod 31) ;; if p is prime then (prod-prime-mod p) = p-1 30 > ,exit --prompt-->
$ scheme48 > ,load ex7-cont-frac-sqrt.scm > (+ 1 (cont-frac (lambda (i) i) (lambda (i) i) 200)) 1.5819767068693262 > > (sqrt 100) 9.999999999999996 > (+ 1 (cont-frac (lambda (i) 99) (lambda (i) 2) 200)) 9.999999999999996 > > (sqrt 0.0001) 0.010365573432748798 > (- 1 (cont-frac (lambda (i) -0.9999) (lambda (i) -2) 200)) 0.010365573432748798 > ,exit $
$ scheme48 > ,load ex8-iter-improve.scm > > (mysqrt 144) 12.000000012408687 > (mysqrt 0.0001) 0.010000714038711746 > ((iterative-improve (lambda (x) (> x 100)) (lambda (x) (+ x 0.3))) 0.7) 100.29999999999941 > ,exit $
$ scheme48 > ,load ex9-pair-int.scm > (define x (my-cons 2 -5)) ; no values returned > (my-car x) 2 > (my-cdr x) -5 > ,exit $
$ scheme48 > ,load ex10-second-max.scm > (second-max 1 2 3 4 5 6 9 9 10 8) 9 > (second-max 2 2) 2 > (seoncd-max 3 2) > ,exit $
$ scheme48 > ,load ex11-triples.scm > (sum-triples '(1 2 3) '(3 4 5) '(4 5 6)) ((1 3 4) (1 4 5) (1 5 4) (1 5 6) (2 3 5) (2 4 6) (3 3 6)) > (sum-triples '(1 2) '(9) '(8 7)) ((1 9 8) (2 9 7)) > (sum-triples '(1 1 1) '(2) '(3 3)) ((1 2 3) (1 2 3) (1 2 3) (1 2 3) (1 2 3) (1 2 3)) > ,exit $
$ scheme48 > ,load ex13-monitor.scm > > (define add (make-monitored +)) ; no values returned > (add 'how-many-calls) 0 > (add 2 4 5) 11 > (add 'how-many-calls) 1 > (define (accumulate op e L) (if (null? L) e (op (car L) (accumulate op e (cdr L))))) ; no values returned > > (accumulate + 0 '(1 2 3 4 5 6)) 21 > (accumulate add 0 '(1 2 3 4 5 6)) 21 > (add 'how-many-calls) 7 > ,exit $