emaphis/HtDP2e-solutions

Rationale for (define AS1 0)

TomCab opened this issue · 1 comments

Hi,
I was checking your code to get some ideas for this exercise, since I was somewhat stuck. Your code helped, thanks.

However, I don't understand why in line 47 you do:
(define AS1 0)
if you never invoke the variable AS1 in the code,
Is there a purpose to your definition or is it just something to be disregarded?
Thanks

Hi Tomas,
I took coursera's class "Introduction to Systematic Program Design" in 2013, that taught the Design recipe from HtDP but didn't follow the book exactly, so my solutions may not be idiomatic to the book's solutions.

The AS1 is never used in the program, it is an example data definition for the animation program. It stands for Animation State. In latter program examples the data definition will be more complex and useful. I probably should include a data definition comment to make it more clear.

Ed