A.2. Knowing The Type Of Each Variable

As is mentioned in the description of the Set! statement, Scheme variables can change type depending on what is being bound to the variable. For example, you can create a variable as an integer, but then assign it a Boolean value like #f at a later time. Once the variable is set to #f, it ceases being an integer and becomes Boolean instead. Since Scheme offers a lot of flexibility in variable manipulation, it is important to double check your syntax each time you set a variable to a certain value. Small unnoticed mistakes, such as a period in the middle of a number, can change the type of the variable without you noticing. These kinds of problems will cause more issues down the line as it becomes harder to locate your mistake.