sicp-ex-3.74



<< Previous exercise (3.73) | Index | Next exercise (3.75) >>


meteorgan

  
  
  
 (define zero-crossings 
         (stream-map sign-change-detector sense-data (cons-stream 0 sense-data))) 

karthikk

I don't think that is right. If the first element of the sense-data stream were negative above solution will show a sign-change crossing immediately when there is none.

  
 (define (zero-crossings sense-data) 
   (stream-map sign-change-detector sense-data (stream-cdr sense-data)))