Notes from 10/07/02 - tail recursion = another name for iteration - means that the recursive call is the last thing executed - nothing stored to be executed later - no need to remember previous values - full recursion needs to keep track of previous values (tree diagram) - naming discussion - name should say what the function does - not what you wrote it for - sum example: wrote it to do 0 to n, can do 0 to n plus s - note: semi-colon (;) allows you to comment lines - use sparingly for now - investigation of (quote ...) and '... - allows explicit specification to bypass the implicit evaluation in Scheme - ' and (quote) are equivalent - different forms of the same thing - new special form: - (define ( ) ) ( ) ... else ) - substitute for nested ifs - can write cond statements either to take advantage of the top-down 'filtering' or can be specific about each condition - recursive fibonacci definition - 2^n or so steps - tree structure - also lots of redundant calculations - iterative saves steps in this case - also, is a more general function - can redefine recursive fib as call to iterative - abstraction: - ((lambda (x) ) )) - eval is based on "algol copy rule" - rule: to evaluate, take , substitute for and eval that