sicp-ex-3.75



<< Previous exercise (3.74) | Index | Next exercise (3.76) >>


meteorgan

  
  
  
 (define (make-zero-crossings input-stream last-value last-avpt) 
         (let ((avpt (/ (+ (stream-car input-stream) last-value) 2))) 
                 (cons-stream (sign-change-detetor avpt last-avpt) 
                                        (make-zero-crossings (stream-cdr input-stream) 
                                                                            (stream-car input-stream) 
                                                                             avpt))))