Welcome to the CHICKEN Scheme pasting service

simpson formula added by int0X80 on Sat Jan 26 18:12:42 2013

(define (sum f a next b)
       (if (> a b)
              0
           (+ (f a)
             (sum f (next a) next b))))


(define (cube x) (* x x x))
(define (simpson-integral a b evenN)
	(define h  (/ (- b a) evenN))
 	(define (next t) (+ a (* t h)))
	(*  (sum cube a next b) (/ h 3)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
What type of object does `map' expect as second argument?
Visually impaired? Let me spell it for you (wav file) download WAV