* Scheme expression Math expr. Scheme expr. ---------- ------------ x + y (+ x y) x * y (* x y) x + y * z (+ x (* y z)) - In general, a function f(x,y,z) is handled in Scheme with (f x y z) - In Scheme, containing single operations in parentheses remove ambiguity in evaluation order (i.e. PEMDAS rule is irrelevant) - In Scheme, there are 3 general categories of values: numbers, symbolic values, and list/trees/structures. These will be discussed in detail as they come up. * Practical DrScheme Information - There are two windows in the interface: definitions and interactions (You can hide either.) Use the interactions window to explore language and test things out Use the definitions window to define functions. After this is done (and the execute command is run), you can try out the function in the interactions window. - Find out info about built-in functions from the manual accessible from the help menu. * Demo: A recursive exponentiation function, using recursion. (See demo pages.) - Note the syntax form for the conditional expression. This deviates from the standard expression form. - Note that a negative exponent causes an infinite recursion. This arises from a lack of negative value handling in the conditional. * Programmers are often interested with the "rough" number of steps an algorithm takes. "Rough" typically implies the dependence on an iteration index n, ignoring constant scale factors and additions (i.e. 100*n + 20 is roughly n)