Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 7 Notes: Special Forms
and and or are not procedures, but special forms. They have a common feature of shortcircuiting at a value if their task is completed early, and then they do not need to
evaluate all of their arguments.
Scheme
1. Special For
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 2 Notes: Cross Evaluation Formula
Review:
Selfevaluating
expression #t, 5, yay
Name expression
+, foo, bar
NV
foo  4
combinations (+ 3 4) to evaluate a combination, sequence of
steps: Evaluate operator
Evaluate arguments
Apply operator value to
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 2 Notes: Standard Procedures
Review:
Selfevaluating
expression #t, 5, yay
Name expression
+, foo, bar
NV
foo  4
combinations (+ 3 4) to evaluate a combination, sequence of steps:
Evaluate operator
Evaluate arguments
Apply operator value to argu
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 1 Notes: Intro to Course
We were handed a piece of cardboard with 32 thumbtacks arranged in a cross
pattern with one hole left empty in the very center. The object was to have only one
thumbtack left in the middle of the cardboard after executing
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 3 Notes: Stepper
Refer to solutions to homework 2 on the server. See solution for the define
even? problem.
(define m 2)
(lambda (m) (* m m) 5)
m is used as a valid name before it is used as a variable; so in the above
evaluation, m does not repre
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 6 Notes: Data Obstructions
Review of list procedures:
cons:
car:
cdr:
cadr:
listref:
list:
append:
(cons elem lst)
(car lst) first element
(cdr lst) the rest of the elements (all but first)
(car (cdr lst) second element
(listref lst k) kth eleme
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 5 Notes: Recursive Measures
Iterative requires less space, because there are no operations to remember.
In order to identify whether a recursive procedure has a recursive or iterative
process embedded in it, look to the left of the recursive call,
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 4 Notes: Intuitive Risks
Beginning of class, instructions to write a program that returns a quotient without
remainder. Utilize the remainder function that we programmed before (remainder
is also preprogrammed into scheme)
(quotient x y) as oppos
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 9 Notes: Associations
From the Lecture 8 handout, directions are:
Given a list that contains both professors and graduate students, compute the total
cost of their salaries.
The following program may be written to satisfy these instructions:
(defi
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 8 Notes: Hypothetical Function Theory
Hypothetical Implementation of pairs
(define cons
(lambda (a b)
(lambda (x)
(if x a b)
(define (car p)
(p #t)
Do type analysis on the above. p is located inside a single open paren and is followed by
a Boolean
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
Lecture 10 Notes: Vector Analysis
Lecture 10 involved defining frames (using vectors) and creating images that w could
manipulate (by flipping over, altering coordinates, etc.). The file needed for this is
called lec9.scm. It needs to be unzipped and the
Introduction to Computer Economic Graphs and Models
ECON 127

Fall 2010
ECO.Exam.One
Economic questions always deal with choice in the face of limited resources,
and the central concern of economics is scarcity. Even if all of the worlds
resources were to magically increase a hundredfold, then the scarcity
principle would sti