When I read the SICP, there is a procedure evaluating the definite integral
of a function f between the limits a and b:

(define (integral f a b dx)
  (define (add-dx x) (+ x dx))
  (* (sum f (+ a (/ dx 2.0)) add-dx b)
     dx))

when I tried to run it on DrRacket, it said that: "define: expected only one
expression for the function body, but found 1 extra part" for this part 
"(* (sum f (+ a (/ dx 2.0)) add-dx b)
     dx))"
I think that what DrRacket said makes sense, but the procedure is clearly on
the the book. So I am really confused. Please help! Thanks!
-- 
View this message in context: 
http://old.nabble.com/question-of-a-new-scheme-user-tp34846702p34846702.html
Sent from the Gnu - MIT Scheme - Users mailing list archive at Nabble.com.


_______________________________________________
MIT-Scheme-users mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/mit-scheme-users

Reply via email to