Notes from 10/09/02 - algol's way of doing copy rule - takes a copy of body, and inserts it for the function call - in that copy, substitutes copies of the value of argument for x - have to be careful - issues come up with simple-minded applications of this - original lisp discussion - S-expressions - S stood for symbolic - also had M-expressions = meta expressions, not actually part of lisp - eval[(S-expression);...] - atomic symbols - term from lisp - integers, rationals (scheme), reals (sort of), strings, symbols (been using these for variables), and the empty list () - atomic symbols don't get broken down furthur - S-expression rules: - every atomic symbol is an S-expression - when a and b are both S-expressions, so is (a . b) - nothing else is an S-expression - lists are shorthand - (a b c) = (a . (b . (c . ()))) - tree structure - last thing is the empty list - also hangs off to the left to remove special cases - list procedures - cons - constructs a pair - used to make lists, ie (cons a '(b c)) is the list (a b c) - car - first part of argument - ie the first element in a list - cdr - right part of an argument - ie the 'rest' of a list, everything but the first