naming
making names for values
- (define pi 3.14) makes a name (pi) for a value (3.14)
- pi is a variable
looking up names
- what does (* pi 2) evaluate to?
- depends on the environment, ie. which defines came before
- after (define pi 3.14), (* pi 2) –> 6.28
- but after (define pi 3.141), (* pi 2) –> 6.282
hint
- easy to forget which defines have been evaluated
- so use scripts: write your code in a separate buffer and evaluate it all
evaluation rule
- (define x e) –> ?
- evaluated for its effect: to make x the name for what e evaluates to
- an expression that attempts to use the value of the define expression is ill-formed