Code Review

Compare your solutions

    #| BEGIN (Write your solution here) |#
(define (stream-ref s n)
  (if (= n 0)
      (stream-car s)
      (stream-ref (stream-cdr s) (- n 1))))
(define (stream-limit s t)
  (let ((s1 (stream-ref s 0))
        (s2 (stream-ref s 1)))
    (if (< (abs (- s2 s1)) t)
        s2
        (stream-limit (stream-cdr s) t))))
#| END |#