1 ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 ;; about the language level of this file in a form that our tools can easily process.
3 #reader(lib "htdp-advanced-reader.ss" "lang")((modname |33.1|) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp")))))
5 ;Adds up #i1/185 n times.
10 [else (+ #i1/185 (add (sub1 n)))]))
12 sub : inexact or number N -> N
13 Determines the number of times that 1/185 can be subtracted from n0. The accumulator represents the number of times that 1/185 has been subtracted from n0 to give n1.
16 (local ((define (sub-accu n1 accumulator)