Welcome to MzScheme version 360, Copyright (c) 2004-2006 PLT Scheme Inc. > (apply + '(3 4 5)) 12 > (+ 3) 3 > (+) 0 > (map + '(3 4 5)) (3 4 5) > (+ 3 4 5) 12 > (eval '(+ 2 3 4)) 9 > (eval (cons + (list 2 3 4))) 9 > (if 2 3 4) 3 > (apply and '(2 3 4)) stdin::121: and: bad syntax in: and === context === repl-loop > (and 2 3 4) 4 > (and 2) 2 > (and) #t > a reference to undefined identifier: a === context === repl-loop > (define a 7) > (and #f (display 2)) #f > (apply and '(2 3 (< 3 4))) stdin::204: and: bad syntax in: and === context === repl-loop > (+ 2 (display 2)) +: expects type as 2nd argument, given: #; other arguments were: 2 === context === repl-loop 2> > (f 2 (f 3 4)) 32> (f 2 3) 2> (define f (lambda (x y) (display x) x)) > (f 2 3) 22 > (f 2 (f 3 4)) 322 > (map + '(2 3 4) '(5 6 7) '(1 2 3)) (8 11 14) > (/ 1 3) 1/3 > pi reference to undefined identifier: pi === context === repl-loop > (/ 1.0 3.0) 0.3333333333333333 > > (make-rat 2 3) (2 3) > > (2 3) > (define a (make-rat 2 3)) > a (2 3) > (display-rat a) 2/(3)> > (display-rat a) 2/3> (/ 1 3) 1/3 > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) reference to undefined identifier: mult-rat === context === repl-loop > > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) 6/12> > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) 6/12> > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) 6/12> (define cons (lambda (x y) (lambda (msg) (if (eq? msg 'car) x y)))) > (cons 2 3) # > (car (cons 2 3)) car: expects argument of type ; given # === context === repl-loop > (define a (cons 2 3)) > a # > (a 'car) 2 > (define car (lambda (cons) (cons 'car))) > (car a) 2 > (define cdr (lambda (cons) (cons 'cdr))) > (cdr a) 3 > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) procedure application: expected procedure, given: (2 3); arguments were: car === context === /Users/terry/Documents/Udel/teaching/280/280-S2007/examples/rat2.scm:21:2: mult-rat repl-loop > > > (display-rat (mult-rat (make-rat 2 3)(make-rat 3 4))) 6/12> cons # >