- Apr 11, 2002
- 374
- 2
- 18
Why do we like stupid threads like this...why  ?
 ?
Tell me!!
BTW: My name is hihellohihi Smily and I welcome you
				
			Tell me!!
BTW: My name is hihellohihi Smily and I welcome you
;; Message passing 
;; ===============
;;
;;  1) The constructor return a procedure of one argument
;;  2) accessing data is done by applying the object on a message
;;
;;  Example:
;;
(define (make-from-real-imag x y)
  (define (dispatch op)
    (cond ((eq? op 'real-part) x)
          ((eq? op 'imag-part) y)
          ((eq? op 'magnitude)
           (sqrt (+ (square x) (square y))))
          ((eq? op 'angle) (atan y x))
          (else
           (error "Unknown op -- MAKE-FROM-REAL-IMAG" op))))
  dispatch) 
	Beast In Flames said:Armaggedon's coming! :zombie:
 
	 
	
 
	