I recently started reading SICP and doing the excercies in the book. I installed both mit-scheme on command line and after tinkering with it a bit, I stumbled upon DrRacket and installed the SICP components from http://www.neilvandyke.org/racket-sicp/
everything was working ok until I came to Excercise 1.10 and when i wrote the function as it is written in the book:
(define (A x y)
(cond ((= y 0) 0)
((= x 0) (* 2 y))
((= y 1) 2)
(else (A (- x 1)
(A x (- y 1))))))
and then run the code with cmd + R, then when I call this from the repl such that:
> (A 1 10)
i get the error
A: undefined;
cannot reference an identifier before its definition
However, the same code works on the version installed on the command line.. What is going on here? Is something broken on DrRacket mit-scheme implementation or am i doing something wrong here?
I'm using DrRacket version 6.1.1(m3) on Mac OS X Yosemite
Any help would be greatly appreciated, thanks!