2015/10/08

SICP 問題1.38

(define (e-2 k)
  (cont-frac (lambda (i) 1.0)
             (lambda (i) (if (= (modulo i 3) 2)
                             (* 2 (+ 1 (quotient i 3)))
                             1.0))
             k))

© 2022 wat-aro